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