PeerTube/client/src/app/core/core.module.ts

83 lines
2.3 KiB
TypeScript
Raw Normal View History

import { CommonModule } from '@angular/common'
2018-02-22 07:15:23 -06:00
import { NgModule, Optional, SkipSelf } from '@angular/core'
import { FormsModule } from '@angular/forms'
2017-08-28 13:28:12 -05:00
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
2018-02-22 07:15:23 -06:00
import { RouterModule } from '@angular/router'
2018-02-16 10:24:47 -06:00
import { LoadingBarModule } from '@ngx-loading-bar/core'
import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
2018-02-23 08:39:50 -06:00
import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
2016-11-20 10:18:15 -06:00
import { AuthService } from './auth'
import { ConfirmService } from './confirm'
import { throwIfAlreadyLoaded } from './module-import-guard'
2018-03-01 06:57:29 -06:00
import { LoginGuard, RedirectService, UserRightGuard } from './routing'
2018-02-22 07:15:23 -06:00
import { ServerService } from './server'
2018-09-06 05:00:53 -05:00
import { ThemeService } from './theme'
import { MenuService } from './menu'
2018-09-12 02:52:08 -05: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'
import { ServerConfigResolver } from './routing/server-config-resolver.service'
2019-05-29 07:39:49 -05:00
import { UnloggedGuard } from '@app/core/routing/unlogged-guard.service'
2019-07-08 08:54:08 -05:00
import { PluginService } from '@app/core/plugins/plugin.service'
2019-07-22 08:40:13 -05:00
import { HooksService } from '@app/core/plugins/hooks.service'
2016-11-20 10:18:15 -06:00
@NgModule({
imports: [
CommonModule,
RouterModule,
FormsModule,
2017-08-28 13:28:12 -05:00
BrowserAnimationsModule,
2018-02-16 10:24:47 -06:00
LoadingBarHttpClientModule,
2018-02-23 08:39:50 -06:00
LoadingBarRouterModule,
2018-12-04 03:29:28 -06:00
LoadingBarModule,
ToastModule,
2018-09-12 02:52:08 -05:00
HotkeyModule.forRoot({
cheatSheetCloseEsc: true
})
2016-11-20 10:18:15 -06:00
],
2017-01-23 15:32:43 -06:00
declarations: [
2018-09-12 02:52:08 -05:00
CheatSheetComponent
2017-01-23 15:32:43 -06:00
],
2017-01-23 15:32:43 -06:00
exports: [
2018-02-16 10:24:47 -06:00
LoadingBarHttpClientModule,
LoadingBarModule,
ToastModule,
2018-09-12 02:52:08 -05:00
CheatSheetComponent
2017-01-23 15:32:43 -06:00
],
providers: [
AuthService,
2017-04-04 14:37:03 -05:00
ConfirmService,
ServerService,
2018-09-06 05:00:53 -05:00
ThemeService,
MenuService,
LoginGuard,
2018-03-01 06:57:29 -06:00
UserRightGuard,
2019-05-29 07:39:49 -05:00
UnloggedGuard,
2019-07-08 08:54:08 -05:00
PluginService,
2019-07-22 08:40:13 -05:00
HooksService,
2019-07-08 08:54:08 -05:00
RedirectService,
Notifier,
MessageService,
UserNotificationSocket,
ServerConfigResolver
]
2016-11-20 10:18:15 -06:00
})
export class CoreModule {
2017-10-31 10:37:37 -05:00
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule')
2016-11-20 10:18:15 -06:00
}
}