]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/core/core.module.ts
d4917f902b8dd85303737048a1334408e04effa8
[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
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 })
55 export class CoreModule {
56 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
57 throwIfAlreadyLoaded(parentModule, 'CoreModule')
58 }
59 }