]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/core/core.module.ts
refactor theme toggle into a service
[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'
693b1aba
C
18
19@NgModule({
20 imports: [
21 CommonModule,
7ddd02c9 22 RouterModule,
1f30a185 23 FormsModule,
e7dbeae8 24 BrowserAnimationsModule,
7ddd02c9 25
68e24d72
C
26 SimpleNotificationsModule.forRoot(),
27
28 LoadingBarHttpClientModule,
998acc22 29 LoadingBarRouterModule,
68e24d72 30 LoadingBarModule.forRoot()
693b1aba 31 ],
5769e1db 32
b99290b1 33 declarations: [
b33f657c 34 ConfirmComponent
b99290b1 35 ],
5769e1db 36
b99290b1 37 exports: [
7ddd02c9 38 SimpleNotificationsModule,
68e24d72
C
39 LoadingBarHttpClientModule,
40 LoadingBarModule,
7ddd02c9 41
b33f657c 42 ConfirmComponent
b99290b1 43 ],
5769e1db
C
44
45 providers: [
46 AuthService,
92fb909c 47 ConfirmService,
f47bf2e1 48 ServerService,
1a00c561 49 ThemeService,
954605a8 50 LoginGuard,
901637bb
C
51 UserRightGuard,
52 RedirectService
5769e1db 53 ]
693b1aba
C
54})
55export class CoreModule {
7a8032bb 56 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
df98563e 57 throwIfAlreadyLoaded(parentModule, 'CoreModule')
693b1aba
C
58 }
59}