]>
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 'ngx-bootstrap/modal'; | |
8 | ||
9 | import { AuthService } from './auth'; | |
10 | import { ConfigService } from './config'; | |
11 | import { ConfirmComponent, ConfirmService } from './confirm'; | |
12 | import { MenuComponent, MenuAdminComponent } from './menu'; | |
13 | import { throwIfAlreadyLoaded } from './module-import-guard'; | |
14 | ||
15 | @NgModule({ | |
16 | imports: [ | |
17 | CommonModule, | |
18 | HttpModule, | |
19 | RouterModule, | |
20 | ||
21 | ModalModule, | |
22 | SimpleNotificationsModule.forRoot() | |
23 | ], | |
24 | ||
25 | declarations: [ | |
26 | ConfirmComponent, | |
27 | MenuComponent, | |
28 | MenuAdminComponent | |
29 | ], | |
30 | ||
31 | exports: [ | |
32 | SimpleNotificationsModule, | |
33 | ||
34 | ConfirmComponent, | |
35 | MenuComponent, | |
36 | MenuAdminComponent | |
37 | ], | |
38 | ||
39 | providers: [ | |
40 | AuthService, | |
41 | ConfirmService, | |
42 | ConfigService | |
43 | ] | |
44 | }) | |
45 | export class CoreModule { | |
46 | constructor( @Optional() @SkipSelf() parentModule: CoreModule) { | |
47 | throwIfAlreadyLoaded(parentModule, 'CoreModule'); | |
48 | } | |
49 | } |