mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
42 lines
712 B
Plaintext
42 lines
712 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# ng
|
|
|
|
> Create and manage Angular applications.
|
|
> More information: <https://angular.io/cli>.
|
|
|
|
- Create a new Angular application inside a directory:
|
|
|
|
`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`
|
|
|
|
- Display version:
|
|
|
|
`ng version`
|