Closed dwoodger closed 4 years ago
At section 6, Lazily Loading Feature Modules. Just added to routes.ts: { path: 'user', loadChildren: './user/user.module#UserModule' }
Full export is:
export const appRoutes: Routes = [ { path: 'events/new', component: CreateEventComponent, canDeactivate: ['canDeactivateCreateEvent'] }, { path: 'events', component: EventsListComponent, resolve: { events: EventListResolver } }, { path: 'events/:id', component: EventDetailsComponent, canActivate: [EventRouteActivator] }, { path: '404', component: Error404Component }, { path: '', redirectTo: '/events', pathMatch: 'full' }, { path: 'user', loadChildren: './user/user.module#UserModule' } ];
But will not compile. Get: Cannot read property 'loadChildren' of undefined
Never mind. Fixed it. I got better errors on another day and found that a routerLink setting was missing an end bracket.
At section 6, Lazily Loading Feature Modules. Just added to routes.ts: { path: 'user', loadChildren: './user/user.module#UserModule' }
Full export is:
export const appRoutes: Routes = [ { path: 'events/new', component: CreateEventComponent, canDeactivate: ['canDeactivateCreateEvent'] }, { path: 'events', component: EventsListComponent, resolve: { events: EventListResolver } }, { path: 'events/:id', component: EventDetailsComponent, canActivate: [EventRouteActivator] }, { path: '404', component: Error404Component }, { path: '', redirectTo: '/events', pathMatch: 'full' }, { path: 'user', loadChildren: './user/user.module#UserModule' } ];
But will not compile. Get: Cannot read property 'loadChildren' of undefined