NOTE This repository has been archived. For a more up to date example of one way to use the ArcGIS API for JavaScript in an application generated with angular-cli, see angular-cli-esri-map.
The application uses the angular-esri-components component library to lazy load the ArcGIS API for JavaScript and then require the modules needed to create and work with a map.
You should not use this repository as a starting point for your own application. This application was generated with an early beta of the angular-cli, and while it has been updated to v1 (thanks to @TheKeithStewart), I do not intend to keep it up to date w/ newer versions of Angular, the CLI, nor the ArcGIS API going forward.
Rather than clone this repository, you should create your own application with the angular-cli and then follow the instructions below to add the above libraries:
You can clone or download this application and then use the instructions below to run it and/or the tests to get a better sense of how it works.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive/pipe/service/class/module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
Run ng github-pages:deploy
to deploy to GitHub Pages.
To get more help on the angular-cli
use ng help
or go check out the Angular-CLI README.