Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NOTE: this documentation is for Angular CLI 6. For Angular CLI 1.x go here instead.
The Angular CLI is a tool to initialize, develop, scaffold and maintain Angular applications
To install the Angular CLI:
npm install -g @angular/cli
ng new my-project cd my-project ng serve
Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
All builds make use of bundling, and using the
--prod flag in
ng build --prod
ng serve --prod will also make use of uglifying and tree-shaking functionality.
Running unit tests
Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes. You can run tests a single time via
Running end-to-end tests
Before running the tests make sure you are serving the app via
End-to-end tests are run via Protractor.
Angular CLI Workspace Schema
There are several stories which will walk you through setting up additional aspects of Angular applications.