]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/routing.module.ts
LP1807523: Associating labels and inputs in angular fmeditor
[Evergreen.git] / Open-ILS / src / eg2 / src / app / routing.module.ts
1 import {NgModule} from '@angular/core';
2 import {RouterModule, Routes} from '@angular/router';
3 import {BaseResolver} from './resolver.service';
4 import {WelcomeComponent} from './welcome.component';
5
6 /**
7  * Avoid loading all application JS up front by lazy-loading sub-modules.
8  * When lazy loading, no module references should be directly imported.
9  * The refs are encoded in the loadChildren attribute of each route.
10  * These modules are encoded as separate JS chunks that are fetched
11  * from the server only when needed.
12  */
13 const routes: Routes = [
14   { path: '',
15     component: WelcomeComponent
16   }, {
17     path: 'staff',
18     resolve : {startup : BaseResolver},
19     loadChildren: './staff/staff.module#StaffModule'
20   }
21 ];
22
23 @NgModule({
24   imports: [RouterModule.forRoot(routes)],
25   exports: [RouterModule],
26   providers: [BaseResolver]
27 })
28
29 export class BaseRoutingModule {}