Angular 12 References/ CLI
🍀 Angular References

Module generator

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


When true, applies lint fixes after generating the module.

Type boolean
Default false


Allows specification of the declaring module.

Type string
Aliases m


The name of the project.

Type string


The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the Routes array declared in the module provided in the --module option.

Type string


Generates a routing module.

Type boolean
Default false


The scope for the generated routing.

Type string
Values Child|Root
Default Child