Skip to content

Angular CLI tool

Install Angular CLI

npm install -g @angular/cli

common used CLI commands

ng new my-app # create a new Angular app
ng serve # run the app in development mode
ng build # build the app for production
ng test # run unit tests
ng test --include src/app/path-to-your-file/your-file.spec.ts # run a specific test file
ng create component path/to/my-component # create a new component