]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/core/core.module.ts
Merge branch 'hotfix/docker' into develop
[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 { SimpleNotificationsModule } from 'angular2-notifications'
11
12 import { AuthService } from './auth'
13 import { ConfirmComponent, ConfirmService } from './confirm'
14 import { throwIfAlreadyLoaded } from './module-import-guard'
15 import { LoginGuard, RedirectService, UserRightGuard } from './routing'
16 import { ServerService } from './server'
17 import { ThemeService } from './theme'
18 import { HotkeyModule } from 'angular2-hotkeys'
19 import { CheatSheetComponent } from '@app/core/hotkeys'
20
21 @NgModule({
22 imports: [
23 CommonModule,
24 RouterModule,
25 FormsModule,
26 BrowserAnimationsModule,
27
28 SimpleNotificationsModule.forRoot(),
29
30 LoadingBarHttpClientModule,
31 LoadingBarRouterModule,
32 LoadingBarModule,
33
34 HotkeyModule.forRoot({
35 cheatSheetCloseEsc: true
36 })
37 ],
38
39 declarations: [
40 ConfirmComponent,
41 CheatSheetComponent
42 ],
43
44 exports: [
45 SimpleNotificationsModule,
46 LoadingBarHttpClientModule,
47 LoadingBarModule,
48
49 ConfirmComponent,
50 CheatSheetComponent
51 ],
52
53 providers: [
54 AuthService,
55 ConfirmService,
56 ServerService,
57 ThemeService,
58 LoginGuard,
59 UserRightGuard,
60 RedirectService
61 ]
62 })
63 export class CoreModule {
64 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
65 throwIfAlreadyLoaded(parentModule, 'CoreModule')
66 }
67 }