]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/core/core.module.ts
Upgrade client dependencies
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
CommitLineData
df98563e 1import { CommonModule } from '@angular/common'
78967fca 2import { NgModule, Optional, SkipSelf } from '@angular/core'
1f30a185 3import { FormsModule } from '@angular/forms'
e7dbeae8 4import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
78967fca 5import { RouterModule } from '@angular/router'
68e24d72
C
6import { LoadingBarModule } from '@ngx-loading-bar/core'
7import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
998acc22 8import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
693b1aba 9
df98563e 10import { SimpleNotificationsModule } from 'angular2-notifications'
7ddd02c9 11
954605a8 12import { AuthService } from './auth'
df98563e 13import { ConfirmComponent, ConfirmService } from './confirm'
df98563e 14import { throwIfAlreadyLoaded } from './module-import-guard'
901637bb 15import { LoginGuard, RedirectService, UserRightGuard } from './routing'
78967fca 16import { ServerService } from './server'
1a00c561 17import { ThemeService } from './theme'
bcb0c895
C
18import { HotkeyModule } from 'angular2-hotkeys'
19import { CheatSheetComponent } from '@app/core/hotkeys'
693b1aba
C
20
21@NgModule({
22 imports: [
23 CommonModule,
7ddd02c9 24 RouterModule,
1f30a185 25 FormsModule,
e7dbeae8 26 BrowserAnimationsModule,
7ddd02c9 27
68e24d72
C
28 SimpleNotificationsModule.forRoot(),
29
30 LoadingBarHttpClientModule,
998acc22 31 LoadingBarRouterModule,
06471769 32 LoadingBarModule,
bcb0c895
C
33
34 HotkeyModule.forRoot({
35 cheatSheetCloseEsc: true
36 })
693b1aba 37 ],
5769e1db 38
b99290b1 39 declarations: [
bcb0c895
C
40 ConfirmComponent,
41 CheatSheetComponent
b99290b1 42 ],
5769e1db 43
b99290b1 44 exports: [
7ddd02c9 45 SimpleNotificationsModule,
68e24d72
C
46 LoadingBarHttpClientModule,
47 LoadingBarModule,
7ddd02c9 48
bcb0c895
C
49 ConfirmComponent,
50 CheatSheetComponent
b99290b1 51 ],
5769e1db
C
52
53 providers: [
54 AuthService,
92fb909c 55 ConfirmService,
f47bf2e1 56 ServerService,
1a00c561 57 ThemeService,
954605a8 58 LoginGuard,
901637bb
C
59 UserRightGuard,
60 RedirectService
5769e1db 61 ]
693b1aba
C
62})
63export class CoreModule {
7a8032bb 64 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
df98563e 65 throwIfAlreadyLoaded(parentModule, 'CoreModule')
693b1aba
C
66 }
67}