]>
Commit | Line | Data |
---|---|---|
df98563e C |
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' | |
693b1aba | 5 | |
df98563e C |
6 | import { SimpleNotificationsModule } from 'angular2-notifications' |
7 | import { ModalModule } from 'ngx-bootstrap/modal' | |
7ddd02c9 | 8 | |
df98563e C |
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' | |
693b1aba C |
14 | |
15 | @NgModule({ | |
16 | imports: [ | |
17 | CommonModule, | |
50b0c262 | 18 | HttpModule, |
7ddd02c9 C |
19 | RouterModule, |
20 | ||
5769e1db | 21 | ModalModule, |
99b727ec | 22 | SimpleNotificationsModule.forRoot() |
693b1aba | 23 | ], |
5769e1db | 24 | |
b99290b1 | 25 | declarations: [ |
5769e1db | 26 | ConfirmComponent, |
b99290b1 C |
27 | MenuComponent, |
28 | MenuAdminComponent | |
29 | ], | |
5769e1db | 30 | |
b99290b1 | 31 | exports: [ |
7ddd02c9 C |
32 | SimpleNotificationsModule, |
33 | ||
5769e1db | 34 | ConfirmComponent, |
b99290b1 C |
35 | MenuComponent, |
36 | MenuAdminComponent | |
37 | ], | |
5769e1db C |
38 | |
39 | providers: [ | |
40 | AuthService, | |
92fb909c C |
41 | ConfirmService, |
42 | ConfigService | |
5769e1db | 43 | ] |
693b1aba C |
44 | }) |
45 | export class CoreModule { | |
df98563e C |
46 | constructor ( @Optional() @SkipSelf() parentModule: CoreModule) { |
47 | throwIfAlreadyLoaded(parentModule, 'CoreModule') | |
693b1aba C |
48 | } |
49 | } |