]>
Commit | Line | Data |
---|---|---|
693b1aba C |
1 | import { NgModule, Optional, SkipSelf } from '@angular/core'; |
2 | import { CommonModule } from '@angular/common'; | |
3 | import { HttpModule } from '@angular/http'; | |
50b0c262 | 4 | import { RouterModule } from '@angular/router'; |
693b1aba | 5 | |
7ddd02c9 | 6 | import { SimpleNotificationsModule } from 'angular2-notifications'; |
ad42bea3 | 7 | import { ModalModule } from 'ngx-bootstrap/modal'; |
7ddd02c9 | 8 | |
693b1aba | 9 | import { AuthService } from './auth'; |
92fb909c | 10 | import { ConfigService } from './config'; |
5769e1db | 11 | import { ConfirmComponent, ConfirmService } from './confirm'; |
b99290b1 | 12 | import { MenuComponent, MenuAdminComponent } from './menu'; |
693b1aba C |
13 | import { throwIfAlreadyLoaded } from './module-import-guard'; |
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 { | |
46 | constructor( @Optional() @SkipSelf() parentModule: CoreModule) { | |
47 | throwIfAlreadyLoaded(parentModule, 'CoreModule'); | |
48 | } | |
49 | } |