29 lines
892 B
Markdown

<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
# ng generate component
## Overview
`ng generate component [name]` generates a component
## Options
`--app` Specifies app name or index to use.
`--change-detection` (`-cd`) Specifies the change detection strategy.
`--flat` Flag to indicate if a dir is created.
`--export` Specifies if declaring module exports the component.
`--inline-style` (`-is`) Specifies if the style will be in the ts file.
`--inline-template` (`-it`) Specifies if the template will be in the ts file.
`--module` (`-m`) Allows specification of the declaring module.
`--prefix` Specifies whether to use the prefix.
`--skip-import` Allows for skipping the module import.
`--spec` Specifies if a spec file is generated.
`--view-encapsulation` (`-ve`) Specifies the view encapsulation strategy.