|
ng new <project-name> [options]
|
Creates a new angular project in the current directory
|
|
ng init <project-name> [options]
|
Creates a new angular project in the current folder
|
ng new MyProjectng new MyProject --directory c:/Repos/Angularng init MyProject --skip-git
|
ng generate <type> [options]
|
Generates code files in your project. Generated files get their own directories by default
|
|
component <path/name>
|
Generates a new component at the specified path with the specified name
|
|
directive <path/name>
|
Generates a new directive at the specified path with the specified name
|
|
route <route/route-component>
|
Generates a route to the named component. The name should be the route used in RouteConfig
|
|
pipe <path/name>
|
Generates a pipe with the specified name at the specified path
|
|
service <path/name>
|
Generates a new service at the specified path with the specified name
|
ng generate component MyComponent --flatng generate service app/services/MyService
|
ng doc <keyword>
|
Searches the keyword in the Angular docs online
|
|
ng format
|
Formats the project code using clang-format
|
|
ng test [options]
|
Run project unit tests using karma
|
|
ng e2e
|
Runs all project end to end tests using protractor
|
|
ng lint
|
Runs codelyzer linter on your project
|
ng test --watchng lint
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.