Open jackesdavid opened 7 years ago
the bundle have been downloaded and the templateUrl too, but does not show in router-outlet
this is my lazy router, its blank and the router outlet its blank too
has my fault sorry , but maybe this can help someone
before export const routes = [ { path: 'sobre', component: SobreRootComponent, children: [{ path: '', component: SobreComponent }] }];
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] })
after (path has a 'sobre' so the route to this was sobre/sobre, this is why was never created) export const routes = [ { path: '', component: SobreRootComponent, children: [{ path: '', component: SobreComponent }] }];
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] })
This is not really lazy loaded, just normal routes stuff. To make it really lazily loaded, you have to have a loadChildren
attribute in the route object.
See this https://angular.io/guide/router#lazy-loading-route-configuration
In this case, I am also at loss as to how to fix this for systemjs
Were you able to resolve the issue?
Hi friend thanks in advance for the help.
i spent days trying to solve this issue. i'm completly lost.
Please someone help-me !
so, with the current config, i can see the lazy module bundled has been called in network when i navegate to the lazy route but the lazy module never show in root router-outlet.
i can see the template url been downloaded in the the network too.
if a put several console logs , the root component is loaded but not instantiated ( constructed) .
tsconfig :
gulp.js
system.config.js