]>
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' |
f3ae606c | 22 | import { ServerConfigResolver } from './routing/server-config-resolver.service' |
b247a132 | 23 | import { UnloggedGuard } from '@app/core/routing/unlogged-guard.service' |
18a6f04c | 24 | import { PluginService } from '@app/core/plugins/plugin.service' |
93cae479 | 25 | import { HooksService } from '@app/core/plugins/hooks.service' |
693b1aba C |
26 | |
27 | @NgModule({ | |
28 | imports: [ | |
29 | CommonModule, | |
7ddd02c9 | 30 | RouterModule, |
1f30a185 | 31 | FormsModule, |
e7dbeae8 | 32 | BrowserAnimationsModule, |
7ddd02c9 | 33 | |
68e24d72 | 34 | LoadingBarHttpClientModule, |
998acc22 | 35 | LoadingBarRouterModule, |
06471769 | 36 | LoadingBarModule, |
f8b2c1b4 | 37 | ToastModule, |
bcb0c895 C |
38 | |
39 | HotkeyModule.forRoot({ | |
40 | cheatSheetCloseEsc: true | |
41 | }) | |
693b1aba | 42 | ], |
5769e1db | 43 | |
b99290b1 | 44 | declarations: [ |
bcb0c895 | 45 | CheatSheetComponent |
b99290b1 | 46 | ], |
5769e1db | 47 | |
b99290b1 | 48 | exports: [ |
68e24d72 C |
49 | LoadingBarHttpClientModule, |
50 | LoadingBarModule, | |
7ddd02c9 | 51 | |
f8b2c1b4 C |
52 | ToastModule, |
53 | ||
bcb0c895 | 54 | CheatSheetComponent |
b99290b1 | 55 | ], |
5769e1db C |
56 | |
57 | providers: [ | |
58 | AuthService, | |
92fb909c | 59 | ConfirmService, |
f47bf2e1 | 60 | ServerService, |
1a00c561 | 61 | ThemeService, |
954605a8 | 62 | LoginGuard, |
901637bb | 63 | UserRightGuard, |
b247a132 C |
64 | UnloggedGuard, |
65 | ||
18a6f04c | 66 | PluginService, |
93cae479 | 67 | HooksService, |
18a6f04c | 68 | |
f8b2c1b4 C |
69 | RedirectService, |
70 | Notifier, | |
9a39392a | 71 | MessageService, |
f3ae606c C |
72 | UserNotificationSocket, |
73 | ServerConfigResolver | |
5769e1db | 74 | ] |
693b1aba C |
75 | }) |
76 | export class CoreModule { | |
7a8032bb | 77 | constructor (@Optional() @SkipSelf() parentModule: CoreModule) { |
df98563e | 78 | throwIfAlreadyLoaded(parentModule, 'CoreModule') |
693b1aba C |
79 | } |
80 | } |