Command#
-
Setup
Command Description npm install -g @angular/cliinstall Angular CLI globally -
Create Application
Command Description ng new [name]create new project ng new [name] --routingcreate project with routing ng new [name] -swill the style be in .ts file ng new [name] -Swill not generate spec file ng new [name] --create-application falseonly 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 serverun the project ng serve -oopen app in the default browser ng serve --ssluse the HTTPS ng serve --port [number]use specific port ng serve buildbuild app to dist folder -
Other
Command Description ng versioncheck angular version