2017-06-16 07:32:15 -05:00
|
|
|
import { CommonModule } from '@angular/common'
|
2018-02-22 07:15:23 -06:00
|
|
|
import { NgModule, Optional, SkipSelf } from '@angular/core'
|
2018-02-22 08:29:32 -06:00
|
|
|
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
|
|
|
|
2017-06-16 07:32:15 -05:00
|
|
|
import { SimpleNotificationsModule } from 'angular2-notifications'
|
2017-01-27 09:14:11 -06:00
|
|
|
|
2017-10-27 09:55:03 -05:00
|
|
|
import { AuthService } from './auth'
|
2017-06-16 07:32:15 -05:00
|
|
|
import { ConfirmComponent, 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'
|
2018-09-12 02:52:08 -05:00
|
|
|
import { HotkeyModule } from 'angular2-hotkeys'
|
|
|
|
import { CheatSheetComponent } from '@app/core/hotkeys'
|
2016-11-20 10:18:15 -06:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
CommonModule,
|
2017-01-27 09:14:11 -06:00
|
|
|
RouterModule,
|
2018-02-22 08:29:32 -06:00
|
|
|
FormsModule,
|
2017-08-28 13:28:12 -05:00
|
|
|
BrowserAnimationsModule,
|
2017-01-27 09:14:11 -06:00
|
|
|
|
2018-02-16 10:24:47 -06:00
|
|
|
SimpleNotificationsModule.forRoot(),
|
|
|
|
|
|
|
|
LoadingBarHttpClientModule,
|
2018-02-23 08:39:50 -06:00
|
|
|
LoadingBarRouterModule,
|
2018-12-04 03:29:28 -06:00
|
|
|
LoadingBarModule,
|
2018-09-12 02:52:08 -05:00
|
|
|
|
|
|
|
HotkeyModule.forRoot({
|
|
|
|
cheatSheetCloseEsc: true
|
|
|
|
})
|
2016-11-20 10:18:15 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
2017-01-23 15:32:43 -06:00
|
|
|
declarations: [
|
2018-09-12 02:52:08 -05:00
|
|
|
ConfirmComponent,
|
|
|
|
CheatSheetComponent
|
2017-01-23 15:32:43 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
2017-01-23 15:32:43 -06:00
|
|
|
exports: [
|
2017-01-27 09:14:11 -06:00
|
|
|
SimpleNotificationsModule,
|
2018-02-16 10:24:47 -06:00
|
|
|
LoadingBarHttpClientModule,
|
|
|
|
LoadingBarModule,
|
2017-01-27 09:14:11 -06:00
|
|
|
|
2018-09-12 02:52:08 -05:00
|
|
|
ConfirmComponent,
|
|
|
|
CheatSheetComponent
|
2017-01-23 15:32:43 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
|
|
|
providers: [
|
|
|
|
AuthService,
|
2017-04-04 14:37:03 -05:00
|
|
|
ConfirmService,
|
2017-10-10 03:18:25 -05:00
|
|
|
ServerService,
|
2018-09-06 05:00:53 -05:00
|
|
|
ThemeService,
|
2017-10-27 09:55:03 -05:00
|
|
|
LoginGuard,
|
2018-03-01 06:57:29 -06:00
|
|
|
UserRightGuard,
|
|
|
|
RedirectService
|
2017-01-27 09:54:44 -06:00
|
|
|
]
|
2016-11-20 10:18:15 -06:00
|
|
|
})
|
|
|
|
export class CoreModule {
|
2017-10-31 10:37:37 -05:00
|
|
|
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
|
2017-06-16 07:32:15 -05:00
|
|
|
throwIfAlreadyLoaded(parentModule, 'CoreModule')
|
2016-11-20 10:18:15 -06:00
|
|
|
}
|
|
|
|
}
|