I have an existing angular cli application and I want to add a new module to my application which will be loaded lazily
I know angular cli provides command to generate modules which can be lazily loaded, what is the quick command I need to type to do below thing
- Generate a new module
- Generate default component to be loaded lazily
- Generate routing module for it and add default component to be loaded first
- Add routing for the lazy load module in main module
When I try ng generate module module-name --route=app --routing=true, it gives me below error
Module option required when creating a lazy loaded routing module.
--moduleis supplied, it would default to theapp.module.