mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:31:50 +08:00
This move will allow other devs to contribute and allow for pull requests and reviews against docs changes.
22 lines
581 B
Markdown
22 lines
581 B
Markdown
# ng generate component
|
|
|
|
## Overview
|
|
`ng generate component [name]` generates a component
|
|
|
|
## Options
|
|
`--flat` flag to indicate if a dir is created
|
|
|
|
`--inline-template` (`-it`) specifies if the template will be in the ts file
|
|
|
|
`--inline-style` (`-is`) specifies if the style will be in the ts file
|
|
|
|
`--prefix` specifies whether to use the prefix
|
|
|
|
`--spec` specifies if a spec file is generated
|
|
|
|
`--view-encapsulation` (`-ve`) set the view encapsulation strategy
|
|
|
|
`--change-detection` (`-cd`) set the change detection strategy
|
|
|
|
`--skip-import` allows for skipping the module import
|