]>
Commit | Line | Data |
---|---|---|
df98563e C |
1 | import { NgModule, Optional, SkipSelf } from '@angular/core' |
2 | import { CommonModule } from '@angular/common' | |
df98563e | 3 | import { RouterModule } from '@angular/router' |
e7dbeae8 | 4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations' |
68e24d72 C |
5 | import { LoadingBarModule } from '@ngx-loading-bar/core' |
6 | import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client' | |
693b1aba | 7 | |
df98563e C |
8 | import { SimpleNotificationsModule } from 'angular2-notifications' |
9 | import { ModalModule } from 'ngx-bootstrap/modal' | |
7ddd02c9 | 10 | |
954605a8 C |
11 | import { AuthService } from './auth' |
12 | import { LoginGuard, UserRightGuard } from './routing' | |
db7af09b | 13 | import { ServerService } from './server' |
df98563e | 14 | import { ConfirmComponent, ConfirmService } from './confirm' |
df98563e | 15 | import { throwIfAlreadyLoaded } from './module-import-guard' |
693b1aba C |
16 | |
17 | @NgModule({ | |
18 | imports: [ | |
19 | CommonModule, | |
7ddd02c9 | 20 | RouterModule, |
e7dbeae8 | 21 | BrowserAnimationsModule, |
7ddd02c9 | 22 | |
5769e1db | 23 | ModalModule, |
68e24d72 C |
24 | SimpleNotificationsModule.forRoot(), |
25 | ||
26 | LoadingBarHttpClientModule, | |
27 | LoadingBarModule.forRoot() | |
693b1aba | 28 | ], |
5769e1db | 29 | |
b99290b1 | 30 | declarations: [ |
b33f657c | 31 | ConfirmComponent |
b99290b1 | 32 | ], |
5769e1db | 33 | |
b99290b1 | 34 | exports: [ |
7ddd02c9 | 35 | SimpleNotificationsModule, |
68e24d72 C |
36 | LoadingBarHttpClientModule, |
37 | LoadingBarModule, | |
7ddd02c9 | 38 | |
b33f657c | 39 | ConfirmComponent |
b99290b1 | 40 | ], |
5769e1db C |
41 | |
42 | providers: [ | |
43 | AuthService, | |
92fb909c | 44 | ConfirmService, |
f47bf2e1 | 45 | ServerService, |
954605a8 C |
46 | LoginGuard, |
47 | UserRightGuard | |
5769e1db | 48 | ] |
693b1aba C |
49 | }) |
50 | export class CoreModule { | |
7a8032bb | 51 | constructor (@Optional() @SkipSelf() parentModule: CoreModule) { |
df98563e | 52 | throwIfAlreadyLoaded(parentModule, 'CoreModule') |
693b1aba C |
53 | } |
54 | } |