mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
1.1 KiB
1.1 KiB
Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see here.
ng generate service
Overview
ng generate service [name]
generates a service
Alias
s - ng generate s [name]
Options
dry-run
--dry-run
(alias: -d
)
Run through without making any changes.
force
--force
(alias: -f
)
Forces overwriting of files.
project
--project
The name of the project.
flat
--flat
Flag to indicate if a dir is created.
spec
--spec
Specifies if a spec file is generated.