Angular 7 References/ CLI

Module generator

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

Create an Angular module.



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


Allows specification of the declaring module.
Type string
Aliases m


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