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