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