mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
1.2 KiB
1.2 KiB
ng generate directive
Overview
ng generate directive [name]
generates a directive
Options
app
`--app` (alias: `-a`) _default value: 1st app_
Specifies app name to use.
export
`--export` _default value: false_
Specifies if declaring module exports the component.
flat
`--flat`
Flag to indicate if a dir is created.
module
`--module` (alias: `-m`)
Allows specification of the declaring module.
prefix
`--prefix`
Specifies whether to use the prefix.
skip-import
`--skip-import`
Allows for skipping the module import.
spec
`--spec`
Specifies if a spec file is generated.