Last active
April 6, 2022 19:32
-
-
Save alxhub/cb81d0b117430393a7c3e2dfc70ac4d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In a separate `lazy.routing.ts` file: | |
@NgModule({ | |
imports: [ | |
LazyPageModule, | |
RouterModule.forChild([ | |
{path: '', pathMatch: 'full', component: LazyPageComponent}, | |
]), | |
], | |
}) | |
export class LazyPageRoutingModule {} | |
// Then, in the main application routing configuration: | |
export const ROUTES: Route[] = [ | |
/* ...other routes */ | |
{ | |
path: 'lazy', | |
loadChildren: () => import('./lazy.routing').then(mod => mod.LazyPageRoutingModule), | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment