mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
16 lines
443 B
Markdown
16 lines
443 B
Markdown
<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
|
|
|
|
# ng generate service
|
|
|
|
## Overview
|
|
`ng generate service [name]` generates a service
|
|
|
|
## Options
|
|
`--app` Specifies app name or index to use.
|
|
|
|
`--flat` Flag to indicate if a dir is created.
|
|
|
|
`--module` (`-m`) Allows you to specify the module where the service should be provided
|
|
|
|
`--spec` Specifies if a spec file is generated.
|