]>
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' | |
e7dbeae8 | 5 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations' |
693b1aba | 6 | |
df98563e C |
7 | import { SimpleNotificationsModule } from 'angular2-notifications' |
8 | import { ModalModule } from 'ngx-bootstrap/modal' | |
7ddd02c9 | 9 | |
954605a8 C |
10 | import { AuthService } from './auth' |
11 | import { LoginGuard, UserRightGuard } from './routing' | |
db7af09b | 12 | import { ServerService } from './server' |
df98563e C |
13 | import { ConfirmComponent, ConfirmService } from './confirm' |
14 | import { MenuComponent, MenuAdminComponent } from './menu' | |
15 | import { throwIfAlreadyLoaded } from './module-import-guard' | |
693b1aba C |
16 | |
17 | @NgModule({ | |
18 | imports: [ | |
19 | CommonModule, | |
50b0c262 | 20 | HttpModule, |
7ddd02c9 | 21 | RouterModule, |
e7dbeae8 | 22 | BrowserAnimationsModule, |
7ddd02c9 | 23 | |
5769e1db | 24 | ModalModule, |
99b727ec | 25 | SimpleNotificationsModule.forRoot() |
693b1aba | 26 | ], |
5769e1db | 27 | |
b99290b1 | 28 | declarations: [ |
b33f657c | 29 | ConfirmComponent |
b99290b1 | 30 | ], |
5769e1db | 31 | |
b99290b1 | 32 | exports: [ |
7ddd02c9 C |
33 | SimpleNotificationsModule, |
34 | ||
b33f657c | 35 | ConfirmComponent |
b99290b1 | 36 | ], |
5769e1db C |
37 | |
38 | providers: [ | |
39 | AuthService, | |
92fb909c | 40 | ConfirmService, |
f47bf2e1 | 41 | ServerService, |
954605a8 C |
42 | LoginGuard, |
43 | UserRightGuard | |
5769e1db | 44 | ] |
693b1aba C |
45 | }) |
46 | export class CoreModule { | |
7a8032bb | 47 | constructor (@Optional() @SkipSelf() parentModule: CoreModule) { |
df98563e | 48 | throwIfAlreadyLoaded(parentModule, 'CoreModule') |
693b1aba C |
49 | } |
50 | } |