1
0
Fork 0
peertube/client/src/app/core/core.module.ts

60 lines
1.5 KiB
TypeScript
Raw Normal View History

import { CommonModule } from '@angular/common'
2018-02-22 13:15:23 +00:00
import { NgModule, Optional, SkipSelf } from '@angular/core'
import { FormsModule } from '@angular/forms'
2017-08-28 18:28:12 +00:00
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
2018-02-22 13:15:23 +00:00
import { RouterModule } from '@angular/router'
2018-02-16 16:24:47 +00:00
import { LoadingBarModule } from '@ngx-loading-bar/core'
import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
2018-02-23 14:39:50 +00:00
import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
2016-11-20 16:18:15 +00:00
import { SimpleNotificationsModule } from 'angular2-notifications'
import { AuthService } from './auth'
import { ConfirmComponent, ConfirmService } from './confirm'
import { throwIfAlreadyLoaded } from './module-import-guard'
2018-03-01 12:57:29 +00:00
import { LoginGuard, RedirectService, UserRightGuard } from './routing'
2018-02-22 13:15:23 +00:00
import { ServerService } from './server'
2018-09-06 10:00:53 +00:00
import { ThemeService } from './theme'
2016-11-20 16:18:15 +00:00
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
2017-08-28 18:28:12 +00:00
BrowserAnimationsModule,
2018-02-16 16:24:47 +00:00
SimpleNotificationsModule.forRoot(),
LoadingBarHttpClientModule,
2018-02-23 14:39:50 +00:00
LoadingBarRouterModule,
2018-02-16 16:24:47 +00:00
LoadingBarModule.forRoot()
2016-11-20 16:18:15 +00:00
],
2017-01-23 21:32:43 +00:00
declarations: [
2017-12-01 08:20:19 +00:00
ConfirmComponent
2017-01-23 21:32:43 +00:00
],
2017-01-23 21:32:43 +00:00
exports: [
SimpleNotificationsModule,
2018-02-16 16:24:47 +00:00
LoadingBarHttpClientModule,
LoadingBarModule,
2017-12-01 08:20:19 +00:00
ConfirmComponent
2017-01-23 21:32:43 +00:00
],
providers: [
AuthService,
2017-04-04 19:37:03 +00:00
ConfirmService,
ServerService,
2018-09-06 10:00:53 +00:00
ThemeService,
LoginGuard,
2018-03-01 12:57:29 +00:00
UserRightGuard,
RedirectService
]
2016-11-20 16:18:15 +00:00
})
export class CoreModule {
2017-10-31 15:37:37 +00:00
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule')
2016-11-20 16:18:15 +00:00
}
}