Angular 9 References/ CLI
References

Service generator

This is the documentation for Angular 9.
You can switch to the latest version Angular 10.
ng generate service [name] [--[argument]=[value]]
ng generate s

Create an Angular service.

Options

--flat#

Flag to indicate if a dir is created.
Type boolean
Default true

--lintFix#

Specifies whether to apply lint fixes after generating.
Type boolean
Default false

--project#

The name of the project.
Type string

--skipTests#

When true, does not create `spec.ts` test files for the new service.
Type boolean
Default false