mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
47 lines
1.1 KiB
Markdown
47 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
|
|
|
|
## Overview
|
|
`ng generate [name]` generates the specified schematic
|
|
|
|
## Alias
|
|
g - `ng g [name]`
|
|
|
|
## Available Schematics:
|
|
- [class](generate/class)
|
|
- [component](generate/component)
|
|
- [directive](generate/directive)
|
|
- [enum](generate/enum)
|
|
- [guard](generate/guard)
|
|
- [interface](generate/interface)
|
|
- [module](generate/module)
|
|
- [pipe](generate/pipe)
|
|
- [service](generate/service)
|
|
- [appShell](generate/app-shell)
|
|
- [application](generate/application)
|
|
- [library](generate/library)
|
|
- [universal](generate/universal)
|
|
|
|
## 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>
|