2018-11-21 09:26:10 +00:00
|
|
|
# ng
|
|
|
|
|
2023-07-16 18:23:40 +01:00
|
|
|
> Create and manage Angular applications.
|
2019-06-04 10:00:08 +01:00
|
|
|
> More information: <https://angular.io/cli>.
|
2018-11-21 09:26:10 +00:00
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Create a new Angular application inside a directory:
|
2018-11-21 09:26:10 +00:00
|
|
|
|
|
|
|
`ng new {{project_name}}`
|
|
|
|
|
|
|
|
- Add a new component to one's application:
|
|
|
|
|
|
|
|
`ng generate component {{component_name}}`
|
|
|
|
|
|
|
|
- Add a new class to one's application:
|
|
|
|
|
|
|
|
`ng generate class {{class_name}}`
|
|
|
|
|
|
|
|
- Add a new directive to one's application:
|
|
|
|
|
|
|
|
`ng generate directive {{directive_name}}`
|
|
|
|
|
|
|
|
- Run the application with the following command in its root directory:
|
|
|
|
|
|
|
|
`ng serve`
|
|
|
|
|
|
|
|
- Build the application:
|
|
|
|
|
|
|
|
`ng build`
|
|
|
|
|
|
|
|
- Run unit tests:
|
|
|
|
|
|
|
|
`ng test`
|
|
|
|
|
|
|
|
- Check the version of your current Angular installation:
|
|
|
|
|
|
|
|
`ng version`
|