Module generator

This is the documentation for Angular 6.
You can switch to the latest version Angular 9.
ng generate module [name] [--[argument]=[value]]
ng generate m

Create an Angular module.



The name of the project.

Type string


Generates a routing module.

Type boolean
Default false


The scope for the generated routing.

Type string
Values Child, Root
Default Child


Specifies if a spec file is generated.

Type boolean
Default true


Flag to indicate if a dir is created.

Type boolean
Default false


Allows specification of the declaring module.

Type string
Aliases m