In my angular 6 project I want to define all routes of DashboardModule
as a children of profile
route in AppModule
like below code
RouterModule.forRoot([
{
path: '',
component: HomeComponent
},
{
path: 'profile',
loadChildren: () => DashboardModule
}
this code run with JIT compiler (while aot:false
in angular.json
file)
but giving runtime compiler is not loaded error with AOT compiler( while aot:true
).
so my question is, is there any way to load DashboardModule's
routes as a children of profile route in AppModule
without lazy loading DashboardModule
?