]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/routing.module.ts
LP1819053 Angular staff catalog basket export
[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: 'about',
23     component: AboutComponent
24   }, {
25     path: 'login',
26     component: StaffLoginComponent
27   }, {
28     path: 'splash',
29     component: StaffSplashComponent
30   }, {
31     path: 'circ',
32     loadChildren : '@eg/staff/circ/routing.module#CircRoutingModule'
33   }, {
34     path: 'cat',
35     loadChildren : '@eg/staff/cat/routing.module#CatRoutingModule'
36   }, {
37     path: 'catalog',
38     loadChildren : '@eg/staff/catalog/catalog.module#CatalogModule'
39   }, {
40     path: 'sandbox',
41     loadChildren : '@eg/staff/sandbox/sandbox.module#SandboxModule'
42   }, {
43     path: 'admin',
44     loadChildren : '@eg/staff/admin/routing.module#AdminRoutingModule'
45   }]
46 }];
47
48 @NgModule({
49   imports: [RouterModule.forChild(routes)],
50   exports: [RouterModule],
51   providers: [StaffResolver]
52 })
53
54 export class StaffRoutingModule {}
55