]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { CommonModule } from '@angular/common' |
78967fca | 2 | import { NgModule, Optional, SkipSelf } from '@angular/core' |
1f30a185 | 3 | import { FormsModule } from '@angular/forms' |
e7dbeae8 | 4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations' |
78967fca | 5 | import { RouterModule } from '@angular/router' |
68e24d72 C |
6 | import { LoadingBarModule } from '@ngx-loading-bar/core' |
7 | import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client' | |
998acc22 | 8 | import { LoadingBarRouterModule } from '@ngx-loading-bar/router' |
693b1aba | 9 | |
954605a8 | 10 | import { AuthService } from './auth' |
457bb213 | 11 | import { ConfirmService } from './confirm' |
df98563e | 12 | import { throwIfAlreadyLoaded } from './module-import-guard' |
901637bb | 13 | import { LoginGuard, RedirectService, UserRightGuard } from './routing' |
78967fca | 14 | import { ServerService } from './server' |
1a00c561 | 15 | import { ThemeService } from './theme' |
bcb0c895 | 16 | import { HotkeyModule } from 'angular2-hotkeys' |
f8b2c1b4 C |
17 | import { CheatSheetComponent } from './hotkeys' |
18 | import { ToastModule } from 'primeng/toast' | |
19 | import { Notifier } from './notification' | |
20 | import { MessageService } from 'primeng/api' | |
9a39392a | 21 | import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service' |
693b1aba C |
22 | |
23 | @NgModule({ | |
24 | imports: [ | |
25 | CommonModule, | |
7ddd02c9 | 26 | RouterModule, |
1f30a185 | 27 | FormsModule, |
e7dbeae8 | 28 | BrowserAnimationsModule, |
7ddd02c9 | 29 | |
68e24d72 | 30 | LoadingBarHttpClientModule, |
998acc22 | 31 | LoadingBarRouterModule, |
06471769 | 32 | LoadingBarModule, |
f8b2c1b4 | 33 | ToastModule, |
bcb0c895 C |
34 | |
35 | HotkeyModule.forRoot({ | |
36 | cheatSheetCloseEsc: true | |
37 | }) | |
693b1aba | 38 | ], |
5769e1db | 39 | |
b99290b1 | 40 | declarations: [ |
bcb0c895 | 41 | CheatSheetComponent |
b99290b1 | 42 | ], |
5769e1db | 43 | |
b99290b1 | 44 | exports: [ |
68e24d72 C |
45 | LoadingBarHttpClientModule, |
46 | LoadingBarModule, | |
7ddd02c9 | 47 | |
f8b2c1b4 C |
48 | ToastModule, |
49 | ||
bcb0c895 | 50 | CheatSheetComponent |
b99290b1 | 51 | ], |
5769e1db C |
52 | |
53 | providers: [ | |
54 | AuthService, | |
92fb909c | 55 | ConfirmService, |
f47bf2e1 | 56 | ServerService, |
1a00c561 | 57 | ThemeService, |
954605a8 | 58 | LoginGuard, |
901637bb | 59 | UserRightGuard, |
f8b2c1b4 C |
60 | RedirectService, |
61 | Notifier, | |
9a39392a C |
62 | MessageService, |
63 | UserNotificationSocket | |
5769e1db | 64 | ] |
693b1aba C |
65 | }) |
66 | export class CoreModule { | |
7a8032bb | 67 | constructor (@Optional() @SkipSelf() parentModule: CoreModule) { |
df98563e | 68 | throwIfAlreadyLoaded(parentModule, 'CoreModule') |
693b1aba C |
69 | } |
70 | } |