diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index c88a383..e5c7a3e 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -3,6 +3,7 @@ import {inject} from "@angular/core"; import {AuthService} from "./data/auth/auth.service"; import {NotificationService} from "@feel/notification"; import {map, skip} from "rxjs"; +import mapRoutes from "./pages/map/map.routes"; const FN: CanActivateFn = route => { const authService = inject(AuthService); @@ -59,7 +60,8 @@ export const routes: Routes = [ canActivate: [FN] }, { - path: 'map', loadChildren: () => import('./pages/map/map.routes'), + path: 'map', + children: mapRoutes, data: { title: $localize`Map`, headerElement: () => import('./pages/map/map-region-selector/map-region-selector.component').then(c => c.MapRegionSelectorComponent) diff --git a/src/app/pages/map/map.routes.ts b/src/app/pages/map/map.routes.ts index fd33671..d6269e0 100644 --- a/src/app/pages/map/map.routes.ts +++ b/src/app/pages/map/map.routes.ts @@ -1,9 +1,8 @@ import {Routes} from '@angular/router'; -import {MapComponent} from './map.component'; const routes: Routes = [ {path: '', redirectTo: '0', pathMatch: 'full'}, - {path: ':regionId', component: MapComponent} + {path: ':regionId', loadComponent: () => import("./map.component").then(c => c.MapComponent)} ]; export default routes;