Installation of the Angular CLI plus commands
|
Installation
|
Creating a Project
|
|
Install LTS version of Node: https://nodejs.org or install with Chocolatey:
choco install nodejs-lts |
ng new <project name>
|
|
Install Angular CLI: npm install -g @angular/cli
|
|
|
Building and Running
|
Testing
|
|
ng serve --open
|
ng lint
|
|
ng build
|
ng test
|
|
ng deploy
|
ng test --watch
|
|
ng e2e
|
|
ng generate app-shell <name>
|
Generates an application shell for running a server-side version of an app.
|
|
ng generate application <name>
|
Generates a new basic application definition in the "projects" subfolder of the workspace.
|
|
ng generate class <name>
|
Creates a new, generic class definition in the given project.
|
|
ng generate component <name>
|
Creates a new, generic component definition in the given project.
|
|
ng generate config <name>
|
Generates a configuration file in the given project.
|
|
ng generate directive <name>
|
Creates a new, generic directive definition in the given project.
|
|
ng generate enum <name>
|
Generates a new, generic enum definition in the given project.
|
|
ng generate environments <name>
|
Generates and configures environment files for a project.
|
|
ng generate guard <name>
|
Generates a new, generic route guard definition in the given project.
|
|
ng generate interceptor <name>
|
Creates a new, generic interceptor definition in the given project.
|
|
ng generate interface <name>
|
Creates a new, generic interface definition in the given project.
|
|
ng generate library <name>
|
Creates a new, generic library project in the current workspace.
|
|
ng generate module <name>
|
Creates a new, generic NgModule definition in the given project.
|
|
ng generate pipe <name>
|
Creates a new, generic pipe definition in the given project.
|
|
ng generate resolver <name>
|
Generates a new, generic resolver definition in the given project.
|
|
ng generate service <name>
|
Creates a new, generic service definition in the given project.
|
|
ng generate service-worker <name>
|
Pass this schematic to the "run" command to create a service worker
|
|
ng generate web-worker <name>
|
Creates a new, generic web worker definition in the given project.
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.