generate service
Command
ng generate service
ng generate s
Creates a new, generic service definition in the given project.
Arguments
name
The name of the service.
Value Type
string
Options
flat
When true (the default), creates files at the top level of the project.
Value Type
boolean
Defaulttrue
project
The name of the project.
Value Type
string
skip-tests
Do not create "spec.ts" test files for the new service.
Value Type
boolean
Defaultfalse
Jump to details