From 3bf77d7c3144b16d55f35998dddc0d67bb8c17b2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 7 Jun 2022 21:38:00 +0200 Subject: ... --- overlays/spm/frontend/src/app/app-routing.module.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'overlays/spm/frontend/src/app/app-routing.module.ts') diff --git a/overlays/spm/frontend/src/app/app-routing.module.ts b/overlays/spm/frontend/src/app/app-routing.module.ts index 2da97cea..bffe8c4d 100644 --- a/overlays/spm/frontend/src/app/app-routing.module.ts +++ b/overlays/spm/frontend/src/app/app-routing.module.ts @@ -1,17 +1,14 @@ import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { SpmComponent } from './spm/spm.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; +import { RouterModule, Routes, PreloadAllModules } from '@angular/router'; const routes: Routes = [ - { path: 'spm', component: SpmComponent }, + { path: 'spm', loadChildren: () => import('./spm/spm.module').then(m => m.SpmModule) }, { path: '', redirectTo: '/spm', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } + { path: '**', loadChildren: () => import('./page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) } ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], + imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })], exports: [RouterModule] }) export class AppRoutingModule { } -- cgit v1.2.3