generate module
Command
ng generate moduleng generate mCreates a new, generic NgModule definition in the given project.
Arguments
nameThe name of the NgModule.
Value Type
stringOptions
flatCreate the new files at the top level of the current project root.
Value Type
booleanDefaultfalsemoduleAlias
m The declaring NgModule.
Value Type
stringprojectThe name of the project.
Value Type
stringrouteThe 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.
Value Type
stringroutingCreate a routing module.
Value Type
booleanDefaultfalserouting-scopeThe scope for the new routing module.
Allowed Values
Child, RootDefaultChildJump to details