]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/core/core.module.ts
Better plugin notifier typings
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
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 { AuthService } from './auth'
11 import { ConfirmService } from './confirm'
12 import { throwIfAlreadyLoaded } from './module-import-guard'
13 import { LoginGuard, RedirectService, UserRightGuard } from './routing'
14 import { ServerService } from './server'
15 import { ThemeService } from './theme'
16 import { MenuService } from './menu'
17 import { HotkeyModule } from 'angular2-hotkeys'
18 import { CheatSheetComponent } from './hotkeys'
19 import { ToastModule } from 'primeng/toast'
20 import { Notifier } from './notification'
21 import { MessageService } from 'primeng/api'
22 import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
23 import { ServerConfigResolver } from './routing/server-config-resolver.service'
24 import { UnloggedGuard } from '@app/core/routing/unlogged-guard.service'
25 import { PluginService } from '@app/core/plugins/plugin.service'
26 import { HooksService } from '@app/core/plugins/hooks.service'
27
28 @NgModule({
29 imports: [
30 CommonModule,
31 RouterModule,
32 FormsModule,
33 BrowserAnimationsModule,
34
35 LoadingBarHttpClientModule,
36 LoadingBarRouterModule,
37 LoadingBarModule,
38 ToastModule,
39
40 HotkeyModule.forRoot({
41 cheatSheetCloseEsc: true
42 })
43 ],
44
45 declarations: [
46 CheatSheetComponent
47 ],
48
49 exports: [
50 LoadingBarHttpClientModule,
51 LoadingBarModule,
52
53 ToastModule,
54
55 CheatSheetComponent
56 ],
57
58 providers: [
59 AuthService,
60 ConfirmService,
61 ServerService,
62 ThemeService,
63 MenuService,
64 LoginGuard,
65 UserRightGuard,
66 UnloggedGuard,
67
68 PluginService,
69 HooksService,
70
71 RedirectService,
72 Notifier,
73 MessageService,
74 UserNotificationSocket,
75 ServerConfigResolver
76 ]
77 })
78 export class CoreModule {
79 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
80 throwIfAlreadyLoaded(parentModule, 'CoreModule')
81 }
82 }