]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/routing.module.ts
LP#1817645: add RemoteAuth profiles to Angular server admin
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / routing.module.ts
1 import {NgModule} from '@angular/core';
2 import {RouterModule, Routes} from '@angular/router';
3 import {StaffResolver} from './resolver.service';
4 import {StaffComponent} from './staff.component';
5 import {StaffLoginComponent} from './login.component';
6 import {StaffSplashComponent} from './splash.component';
7 import {AboutComponent} from './about.component';
8
9 // Not using 'canActivate' because it's called before all resolvers,
10 // even the parent resolver, but the resolvers parse the IDL, load settings,
11 // etc.  Chicken, meet egg.
12
13 const routes: Routes = [{
14   path: '',
15   component: StaffComponent,
16   resolve: {staffResolver : StaffResolver},
17   children: [{
18     path: '',
19     redirectTo: 'splash',
20     pathMatch: 'full',
21   }, {
22     path: 'booking',
23     loadChildren : '@eg/staff/booking/booking.module#BookingModule'
24   }, {
25     path: 'about',
26     component: AboutComponent
27   }, {
28     path: 'login',
29     component: StaffLoginComponent
30   }, {
31     path: 'splash',
32     component: StaffSplashComponent
33   }, {
34     path: 'circ',
35     loadChildren : '@eg/staff/circ/routing.module#CircRoutingModule'
36   }, {
37     path: 'cat',
38     loadChildren : '@eg/staff/cat/routing.module#CatRoutingModule'
39   }, {
40     path: 'catalog',
41     loadChildren : '@eg/staff/catalog/catalog.module#CatalogModule'
42   }, {
43     path: 'sandbox',
44     loadChildren : '@eg/staff/sandbox/sandbox.module#SandboxModule'
45   }, {
46     path: 'admin',
47     loadChildren : '@eg/staff/admin/routing.module#AdminRoutingModule'
48   }]
49 }];
50
51 @NgModule({
52   imports: [RouterModule.forChild(routes)],
53   exports: [RouterModule],
54   providers: [StaffResolver]
55 })
56
57 export class StaffRoutingModule {}
58