]>
Commit | Line | Data |
---|---|---|
1 | import { NgModule, Optional, SkipSelf } from '@angular/core'; | |
2 | import { CommonModule } from '@angular/common'; | |
3 | import { HttpModule } from '@angular/http'; | |
4 | import { RouterModule } from '@angular/router'; | |
5 | ||
6 | import { SimpleNotificationsModule } from 'angular2-notifications'; | |
7 | import { ModalModule } from 'ng2-bootstrap/modal'; | |
8 | ||
9 | import { AuthService } from './auth'; | |
10 | import { ConfirmComponent, ConfirmService } from './confirm'; | |
11 | import { MenuComponent, MenuAdminComponent } from './menu'; | |
12 | import { throwIfAlreadyLoaded } from './module-import-guard'; | |
13 | ||
14 | @NgModule({ | |
15 | imports: [ | |
16 | CommonModule, | |
17 | HttpModule, | |
18 | RouterModule, | |
19 | ||
20 | ModalModule, | |
21 | SimpleNotificationsModule.forRoot() | |
22 | ], | |
23 | ||
24 | declarations: [ | |
25 | ConfirmComponent, | |
26 | MenuComponent, | |
27 | MenuAdminComponent | |
28 | ], | |
29 | ||
30 | exports: [ | |
31 | SimpleNotificationsModule, | |
32 | ||
33 | ConfirmComponent, | |
34 | MenuComponent, | |
35 | MenuAdminComponent | |
36 | ], | |
37 | ||
38 | providers: [ | |
39 | AuthService, | |
40 | ConfirmService | |
41 | ] | |
42 | }) | |
43 | export class CoreModule { | |
44 | constructor( @Optional() @SkipSelf() parentModule: CoreModule) { | |
45 | throwIfAlreadyLoaded(parentModule, 'CoreModule'); | |
46 | } | |
47 | } |