Answer the question
In order to leave comments, you need to log in
Routes loads angular 2 parent module, how to fix?
There are routes
const Routes: Routes = [
{path: '', loadChildren: './entry-module/entry.module#EntryModule'},
{path: 'auto', loadChildren: './auto-module/auto.module#AutoModule'},
{path: 'avia', loadChildren: './avia-module/avia.module#AviaModule'},
];
Answer the question
In order to leave comments, you need to log in
Place it at the end of the list:
const Routes: Routes = [
{path: 'auto', loadChildren: './auto-module/auto.module#AutoModule'},
{path: 'avia', loadChildren: './avia-module/avia.module#AviaModule'},
{path: '', loadChildren: './entry-module/entry.module#EntryModule'},
];
{
path: '',
pathMatch: 'full',
redirectTo: 'entry',
},
{
path: 'entry',
loadChildren: 'entry-module/entry.module#EntryModule',
},
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question