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