mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:34:21 +08:00
46 lines
727 B
Markdown
46 lines
727 B
Markdown
# ng generate guard
|
|
|
|
## Overview
|
|
`ng generate guard [name]` generates a guard
|
|
|
|
## Options
|
|
<details>
|
|
<summary>app</summary>
|
|
<p>
|
|
<code>--app</code> (aliases: <code>-a</code>) <em>default value: 1st app</em>
|
|
</p>
|
|
<p>
|
|
Specifies app name to use.
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>flat</summary>
|
|
<p>
|
|
<code>--flat</code>
|
|
</p>
|
|
<p>
|
|
Indicate if a dir is created.
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>module</summary>
|
|
<p>
|
|
<code>--module</code> (aliases: <code>-m</code>)
|
|
</p>
|
|
<p>
|
|
Specifies where the guard should be provided.
|
|
</p>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>spec</summary>
|
|
<p>
|
|
<code>--spec</code>
|
|
</p>
|
|
<p>
|
|
Specifies if a spec file is generated.
|
|
</p>
|
|
</details>
|