mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 04:26:01 +08:00
57 lines
1.1 KiB
Markdown
57 lines
1.1 KiB
Markdown
<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
|
|
**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
|
|
# ng generate class
|
|
|
|
## Overview
|
|
`ng generate class [name]` generates a class
|
|
|
|
## Alias
|
|
cl - `ng generate cl [name]`
|
|
|
|
## Options
|
|
<details>
|
|
<summary>dry-run</summary>
|
|
<p>
|
|
<code>--dry-run</code> (alias: <code>-d</code>)
|
|
</p>
|
|
<p>
|
|
Run through without making any changes.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>force</summary>
|
|
<p>
|
|
<code>--force</code> (alias: <code>-f</code>)
|
|
</p>
|
|
<p>
|
|
Forces overwriting of files.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>project</summary>
|
|
<p>
|
|
<code>--project</code>
|
|
</p>
|
|
<p>
|
|
The name of the project.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>spec</summary>
|
|
<p>
|
|
<code>--spec</code>
|
|
</p>
|
|
<p>
|
|
Specifies if a spec file is generated.
|
|
</p>
|
|
</details>
|
|
<details>
|
|
<summary>type</summary>
|
|
<p>
|
|
<code>--type</code>
|
|
</p>
|
|
<p>
|
|
Specifies the type of class.
|
|
</p>
|
|
</details>
|