diff options
Diffstat (limited to 'overlays/spm/frontend/src/app/app-routing.module.ts')
-rw-r--r-- | overlays/spm/frontend/src/app/app-routing.module.ts | 11 |
1 files changed, 4 insertions, 7 deletions
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 @@ | |||
1 | import { NgModule } from '@angular/core'; | 1 | import { NgModule } from '@angular/core'; |
2 | import { RouterModule, Routes } from '@angular/router'; | 2 | import { RouterModule, Routes, PreloadAllModules } from '@angular/router'; |
3 | |||
4 | import { SpmComponent } from './spm/spm.component'; | ||
5 | import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; | ||
6 | 3 | ||
7 | const routes: Routes = [ | 4 | const routes: Routes = [ |
8 | { path: 'spm', component: SpmComponent }, | 5 | { path: 'spm', loadChildren: () => import('./spm/spm.module').then(m => m.SpmModule) }, |
9 | { path: '', redirectTo: '/spm', pathMatch: 'full' }, | 6 | { path: '', redirectTo: '/spm', pathMatch: 'full' }, |
10 | { path: '**', component: PageNotFoundComponent } | 7 | { path: '**', loadChildren: () => import('./page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) } |
11 | ]; | 8 | ]; |
12 | 9 | ||
13 | @NgModule({ | 10 | @NgModule({ |
14 | imports: [RouterModule.forRoot(routes)], | 11 | imports: [RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })], |
15 | exports: [RouterModule] | 12 | exports: [RouterModule] |
16 | }) | 13 | }) |
17 | export class AppRoutingModule { } | 14 | export class AppRoutingModule { } |