Getting started with Angular CLI
The Angular CLI is a command line interface tool that was released as part of Angular 2. It helps you to scaffold, develop, test, lint and deploy angular apps.
Install Angular CLI
npm install -g @angular/cli
Create new project
ng new angular-project
You can supply more optional params to new command. More options here
Serve your project
cd new-project ng serv
If you want to change port, proxy, SSL certificate and all other server config. More options here
Test your app with karma
Test will automatically run after build. Test command is in live-reload mode. If you want to execute it only once. Add flag –watch=false. More options here
Lint your app
You can list your entire application using tslint with the command. More options here
Building your app
Build command compiles your application into a output directory.
You can customized both a build target and an environment by passing –target and –environment flags respectively. More options here
Any default values can be overridden in angular-cli.json at the root level generated during ng new command.