generate service
Command
ng generate serviceng generate sCreates a new, generic service definition in the given project.
Arguments
nameThe name of the service.
Value Type
stringOptions
flatWhen true (the default), creates files at the top level of the project.
Value Type
booleanDefaulttrueprojectThe name of the project.
Value Type
stringskip-testsDo not create "spec.ts" test files for the new service.
Value Type
booleanDefaultfalseJump to details