1.0.4 • Published 4 years ago
ng-page v1.0.4
Getting Started With Schematics
This package was built in order to quickly build a lazy loaded PAGE
component.
ng g ng-page:page <name of new page>
Example
ng g ng-page:page home
Add new route
After creating a new Page
simply add a new lazy loaded route
{
path: 'home',
loadChildren: () => import('./home/home.module').then(m => m.HomePageModule)
}
NOTE:
The page can be created in a sub-directory, example below
ng g ng-page:page main/pages/home
then simply update the main routing to reflect the same
{
path: 'home',
loadChildren: () => import('./main/pages/home/home.module').then(m => m.HomePageModule)
}