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

73 lines
1.9 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 { 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'
2018-09-12 07:52:08 +00:00
import { HotkeyModule } from 'angular2-hotkeys'
import { CheatSheetComponent } from './hotkeys'
import { ToastModule } from 'primeng/toast'
import { Notifier } from './notification'
import { MessageService } from 'primeng/api'
import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
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
LoadingBarHttpClientModule,
2018-02-23 14:39:50 +00:00
LoadingBarRouterModule,
2018-12-04 09:29:28 +00:00
LoadingBarModule,
ToastModule,
2018-09-12 07:52:08 +00:00
HotkeyModule.forRoot({
cheatSheetCloseEsc: true
})
2016-11-20 16:18:15 +00:00
],
2017-01-23 21:32:43 +00:00
declarations: [
2018-09-12 07:52:08 +00:00
ConfirmComponent,
CheatSheetComponent
2017-01-23 21:32:43 +00:00
],
2017-01-23 21:32:43 +00:00
exports: [
2018-02-16 16:24:47 +00:00
LoadingBarHttpClientModule,
LoadingBarModule,
ToastModule,
2018-09-12 07:52:08 +00:00
ConfirmComponent,
CheatSheetComponent
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,
Notifier,
MessageService,
UserNotificationSocket
]
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
}
}