aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app-routing.module.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app-routing.module.ts')
-rw-r--r--client/src/app/app-routing.module.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts
index b5a677d15..a87f4ce1b 100644
--- a/client/src/app/app-routing.module.ts
+++ b/client/src/app/app-routing.module.ts
@@ -4,10 +4,13 @@ import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router'
4import { PreloadSelectedModulesList } from './core' 4import { PreloadSelectedModulesList } from './core'
5import { AppComponent } from '@app/app.component' 5import { AppComponent } from '@app/app.component'
6import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' 6import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
7import { MenuGuards } from '@app/core/routing/menu-guard.service'
7 8
8const routes: Routes = [ 9const routes: Routes = [
9 { 10 {
10 path: 'admin', 11 path: 'admin',
12 canActivate: [ MenuGuards.close() ],
13 canDeactivate: [ MenuGuards.open() ],
11 loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule) 14 loadChildren: () => import('./+admin/admin.module').then(m => m.AdminModule)
12 }, 15 },
13 { 16 {
@@ -54,6 +57,7 @@ const routes: Routes = [
54 }) 57 })
55 ], 58 ],
56 providers: [ 59 providers: [
60 MenuGuards.guards,
57 PreloadSelectedModulesList, 61 PreloadSelectedModulesList,
58 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy } 62 { provide: RouteReuseStrategy, useClass: CustomReuseStrategy }
59 ], 63 ],