Command#
-
Setup
Command Description npm install -g @angular/cli
install Angular CLI globally -
Create Application
Command Description ng new [name]
create new project ng new [name] --routing
create project with routing ng new [name] -s
will the style be in .ts file ng new [name] -S
will not generate spec file ng new [name] --create-application false
only create the workspace -
Generate
Command Description ng g app [name]
create new app in the project ng g c [name]
create component ng g s [name]
create service ng g cl [name]
create class ng g lib [name]
create library -
Build
Command Description ng serve
run the project ng serve -o
open app in the default browser ng serve --ssl
use the HTTPS ng serve --port [number]
use specific port ng serve build
build app to dist folder -
Other
Command Description ng version
check angular version