Код: Выделить всё
{
path: Constants.vals.pageRoutePaths.performance,
loadChildren: () => import('./performance/performance.routes').then((r) => r.routes),
},
< /code>
, а затем компонент маршруты. < /p>
export const routes: Routes = [
{
path: '',
component: PerformancePage,
providers: [CanDeactivateGuard],
canDeactivate: [CanDeactivateGuard],
},
];
< /code>
Я регистрирую события маршрутизатора, и я вижу следующее для одного из неудачных маршрутов ... < /p>
00000292 32.07667160 [11508] [DEBUG] MyApp - 6c0972eb102e11cd - AppRoutingService: Router event NavigationStart(id: 20, url: '/performance')
00000293 32.07699203 [11508] [DEBUG] MyApp - 6c0972eb102e11cd - AppRoutingService: Router event RouteConfigLoadStart(path: performance)
00000294 32.07778549 [11508] [DEBUG] MyApp - 6c0972eb102e11cd - AppRoutingService: Router event NavigationError(id: 20, url: '/performance', error: TypeError: Failed to fetch dynamically imported module: https://localhost/chunk-5YE56RPK.js)
Код: Выделить всё
AppRoutingServiceПодробнее здесь: https://stackoverflow.com/questions/797 ... build-only
Мобильная версия