mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-19 03:01:19 +00:00
Update cheatsheets
This commit is contained in:
36
tldr/ng
36
tldr/ng
@@ -6,36 +6,36 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# ng
|
# ng
|
||||||
|
|
||||||
> Create and manage Angular applications.
|
> Create and manage Angular applications.
|
||||||
> More information: <https://angular.io/cli>.
|
> More information: <https://angular.dev/cli>.
|
||||||
|
|
||||||
- Create a new Angular application inside a directory:
|
- Create a new Angular application inside a directory:
|
||||||
|
|
||||||
`ng new {{project_name}}`
|
`ng {{[n|new]}} {{project_name}}`
|
||||||
|
|
||||||
- Add a new component to one's application:
|
- Compile the application and start a local development server:
|
||||||
|
|
||||||
`ng generate component {{component_name}}`
|
`ng {{[s|serve]}}`
|
||||||
|
|
||||||
- Add a new class to one's application:
|
- Create a new component:
|
||||||
|
|
||||||
`ng generate class {{class_name}}`
|
`ng {{[g|generate]}} {{[c|component]}} {{component_name}}`
|
||||||
|
|
||||||
- Add a new directive to one's application:
|
- Build an Angular application or library:
|
||||||
|
|
||||||
`ng generate directive {{directive_name}}`
|
`ng {{[b|build]}}`
|
||||||
|
|
||||||
- Run the application with the following command in its root directory:
|
|
||||||
|
|
||||||
`ng serve`
|
|
||||||
|
|
||||||
- Build the application:
|
|
||||||
|
|
||||||
`ng build`
|
|
||||||
|
|
||||||
- Run unit tests:
|
- Run unit tests:
|
||||||
|
|
||||||
`ng test`
|
`ng {{[t|test]}}`
|
||||||
|
|
||||||
|
- Add a package to the current project:
|
||||||
|
|
||||||
|
`ng add {{package}}`
|
||||||
|
|
||||||
|
- Update workspace dependencies:
|
||||||
|
|
||||||
|
`ng update`
|
||||||
|
|
||||||
- Display version:
|
- Display version:
|
||||||
|
|
||||||
`ng version`
|
`ng {{[v|version]}}`
|
||||||
|
|||||||
Reference in New Issue
Block a user