error:`runtime compiler is not loaded` in aot mode

Multi tool use
error:`runtime compiler is not loaded` in aot mode
In my angular 6 project I want to define all routes of DashboardModule
as a children of profile
route in AppModule
like below code
DashboardModule
profile
AppModule
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
).
aot:false
angular.json
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
?
DashboardModule's
AppModule
DashboardModule
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.