Answer the question
In order to leave comments, you need to log in
Routes not working in modules for parent element?
Good afternoon everyone!
I can’t figure out the routes module, the problem is this:
There is an app component that contains a toolbar.
Routes module:
const appRoutes: Routes = [
{
path: '',
children: [
//{ path: '', redirectTo: 'general-info' },
{
path: '',
loadChildren: 'app/passport/generalInfo/shared/general-info.module#GeneralInfoModule'
},
{ path: 'medtech', component: AppComponent }
]
}
];
@NgModule({
imports: [
RouterModule.forRoot(appRoutes)
],
exports: [
RouterModule
]
})
export class AppRoutingModule { }
const generalRoutes: Routes = [
{ path: '', redirectTo: 'general-info', pathMatch: 'full'},
{
path: 'general-info', component: GeneralInfoComponent,
children: [
{ path: '', loadChildren: 'app/passport/generalInfo/detailInfo/informationMenu/detail-info.module#DetailInfoModule' },
{ path: 'bank', component: BankComponent }
]
}
];
@NgModule({
imports: [
RouterModule.forChild(generalRoutes)
],
exports: [
RouterModule
]
})
export class GeneralRoutingModule { }
Uncaught (in promise): TypeError: undefined is not an object (evaluating 'outlet.outletMap._outlets')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question