Created
May 13, 2022 23:29
This file contains 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
// En un archivo `lazy.routing.ts` separado: | |
@NgModule({ | |
imports: [ | |
LazyPageModule, | |
RouterModule.forChild([ | |
{path: '', pathMatch: 'full', component: LazyPageComponent}, | |
]), | |
], | |
}) | |
export class LazyPageRoutingModule {} | |
// Luego, en la configuración de enrutamiento de la aplicación principal | |
export const ROUTES: Route[] = [ | |
/* ...otras rutas */ | |
{ | |
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