Announcement: Launch of Powerful Code Scripts to Simplify Development
October 10, 2025
In this guide, we will learn how to create a lazy-loaded module and its feature component with just one command
We can do this directly in the terminal using the following command:
ng g m course — module app — routing true — route course
The above command will do the following things:
Also, the app routing module has been updated with a lazy loaded route to your new course module.
{ path: 'course', loadChildren: () => import('./course/course.module').then(m => m.CourseModule) }
This one line of command does a lot for you and makes it so much easier when you work with Angular.