]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/core/core.module.ts
Merge branch 'release/v1.2.0'
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
... / ...
CommitLineData
1import { CommonModule } from '@angular/common'
2import { NgModule, Optional, SkipSelf } from '@angular/core'
3import { FormsModule } from '@angular/forms'
4import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
5import { RouterModule } from '@angular/router'
6import { LoadingBarModule } from '@ngx-loading-bar/core'
7import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
8import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
9
10import { AuthService } from './auth'
11import { ConfirmService } from './confirm'
12import { throwIfAlreadyLoaded } from './module-import-guard'
13import { LoginGuard, RedirectService, UserRightGuard } from './routing'
14import { ServerService } from './server'
15import { ThemeService } from './theme'
16import { HotkeyModule } from 'angular2-hotkeys'
17import { CheatSheetComponent } from './hotkeys'
18import { ToastModule } from 'primeng/toast'
19import { Notifier } from './notification'
20import { MessageService } from 'primeng/api'
21import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
22
23@NgModule({
24 imports: [
25 CommonModule,
26 RouterModule,
27 FormsModule,
28 BrowserAnimationsModule,
29
30 LoadingBarHttpClientModule,
31 LoadingBarRouterModule,
32 LoadingBarModule,
33 ToastModule,
34
35 HotkeyModule.forRoot({
36 cheatSheetCloseEsc: true
37 })
38 ],
39
40 declarations: [
41 CheatSheetComponent
42 ],
43
44 exports: [
45 LoadingBarHttpClientModule,
46 LoadingBarModule,
47
48 ToastModule,
49
50 CheatSheetComponent
51 ],
52
53 providers: [
54 AuthService,
55 ConfirmService,
56 ServerService,
57 ThemeService,
58 LoginGuard,
59 UserRightGuard,
60 RedirectService,
61 Notifier,
62 MessageService,
63 UserNotificationSocket
64 ]
65})
66export class CoreModule {
67 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
68 throwIfAlreadyLoaded(parentModule, 'CoreModule')
69 }
70}