Add ability to add custom css/javascript
[oweals/peertube.git] / client / src / app / core / core.module.ts
1 import { NgModule, Optional, SkipSelf } from '@angular/core'
2 import { CommonModule } from '@angular/common'
3 import { RouterModule } from '@angular/router'
4 import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
5 import { LoadingBarModule } from '@ngx-loading-bar/core'
6 import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
7
8 import { SimpleNotificationsModule } from 'angular2-notifications'
9 import { ModalModule } from 'ngx-bootstrap/modal'
10
11 import { AuthService } from './auth'
12 import { LoginGuard, UserRightGuard } from './routing'
13 import { ServerService } from './server'
14 import { ConfirmComponent, ConfirmService } from './confirm'
15 import { throwIfAlreadyLoaded } from './module-import-guard'
16
17 @NgModule({
18   imports: [
19     CommonModule,
20     RouterModule,
21     BrowserAnimationsModule,
22
23     ModalModule,
24     SimpleNotificationsModule.forRoot(),
25
26     LoadingBarHttpClientModule,
27     LoadingBarModule.forRoot()
28   ],
29
30   declarations: [
31     ConfirmComponent
32   ],
33
34   exports: [
35     SimpleNotificationsModule,
36     LoadingBarHttpClientModule,
37     LoadingBarModule,
38
39     ConfirmComponent
40   ],
41
42   providers: [
43     AuthService,
44     ConfirmService,
45     ServerService,
46     LoginGuard,
47     UserRightGuard
48   ]
49 })
50 export class CoreModule {
51   constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
52     throwIfAlreadyLoaded(parentModule, 'CoreModule')
53   }
54 }