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