2017-03-23 17:25:30 -07:00

118 lines
2.0 KiB
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
<details>
<summary>app</summary>
<p>
`--app` (alias: `-a`) _default value: 1st app_
</p>
<p>
Specifies app name to use.
</p>
</details>
<details>
<summary>change-detection</summary>
<p>
`--change-detection` (alias: `-cd`)
</p>
<p>
Specifies the change detection strategy.
</p>
</details>
<details>
<summary>flat</summary>
<p>
`--flat` _default value: false_
</p>
<p>
Flag to indicate if a dir is created.
</p>
</details>
<details>
<summary>export</summary>
<p>
`--export` (alias: `-`) _default value: false_
</p>
<p>
Specifies if declaring module exports the component.
</p>
</details>
<details>
<summary>inline-style</summary>
<p>
`--inline-style` (alias: `-is`) _default value: false_
</p>
<p>
Specifies if the style will be in the ts file.
</p>
</details>
<details>
<summary>inline-template</summary>
<p>
`--inline-template` (alias: `-it`) _default value: false_
</p>
<p>
Specifies if the template will be in the ts file.
</p>
</details>
<details>
<summary>module</summary>
<p>
`--module` (alias: `-m`)
</p>
<p>
Allows specification of the declaring module.
</p>
</details>
<details>
<summary>prefix</summary>
<p>
`--prefix`
</p>
<p>
Specifies whether to use the prefix.
</p>
</details>
<details>
<summary>skip-import</summary>
<p>
`--skip-import` _default value: false_
</p>
<p>
Allows for skipping the module import.
</p>
</details>
<details>
<summary>spec</summary>
<p>
`--spec`
</p>
<p>
Specifies if a spec file is generated.
</p>
</details>
<details>
<summary>view-encapsulation</summary>
<p>
`--view-encapsulation` (alias: `-ve`)
</p>
<p>
Specifies the view encapsulation strategy.
</p>
</details>