Service generator

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

Create an Angular service.

Options

project#

The name of the project.

Type string

flat#

Flag to indicate if a dir is created.

Type boolean
Default true

spec#

Specifies if a spec file is generated.

Type boolean
Default true

lintFix#

Specifies whether to apply lint fixes after generating.

Type boolean
Default false