import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
import { ClipboardModule } from 'ngx-clipboard'
-import { HotkeyModule } from '@app/core/hotkeys'
-import { IHotkeyOptions } from 'angular2-hotkeys'
import 'focus-visible'
import { AppRoutingModule } from './app-routing.module'
BrowserModule,
// FIXME: https://github.com/maxisam/ngx-clipboard/issues/133
ClipboardModule,
- HotkeyModule.forRoot({
- cheatSheetCloseEsc: true
- } as IHotkeyOptions),
CoreModule,
SharedModule,
import { LoginGuard, RedirectService, UserRightGuard } from './routing'
import { ServerService } from './server'
import { ThemeService } from './theme'
+import { HotkeyModule } from 'angular2-hotkeys'
+import { CheatSheetComponent } from '@app/core/hotkeys'
@NgModule({
imports: [
LoadingBarHttpClientModule,
LoadingBarRouterModule,
- LoadingBarModule.forRoot()
+ LoadingBarModule.forRoot(),
+
+ HotkeyModule.forRoot({
+ cheatSheetCloseEsc: true
+ })
],
declarations: [
- ConfirmComponent
+ ConfirmComponent,
+ CheatSheetComponent
],
exports: [
LoadingBarHttpClientModule,
LoadingBarModule,
- ConfirmComponent
+ ConfirmComponent,
+ CheatSheetComponent
],
providers: [
styleUrls: [ './hotkeys.component.scss' ]
})
export class CheatSheetComponent implements OnInit, OnDestroy {
- helpVisible = false
@Input() title = this.i18n('Keyboard Shortcuts:')
+ helpVisible = false
subscription: Subscription
hotkeys: Hotkey[]
+++ /dev/null
-import { NgModule, ModuleWithProviders } from '@angular/core'
-import { CommonModule } from '@angular/common'
-import { HotkeysDirective, IHotkeyOptions, HotkeyOptions, HotkeysService } from 'angular2-hotkeys'
-import { CheatSheetComponent } from './hotkeys.component'
-
-export * from './hotkeys.component'
-
-@NgModule({
- imports : [CommonModule],
- exports : [HotkeysDirective, CheatSheetComponent],
- declarations : [HotkeysDirective, CheatSheetComponent]
-})
-export class HotkeyModule {
- static forRoot (options: IHotkeyOptions = {}): ModuleWithProviders {
- return {
- ngModule : HotkeyModule,
- providers : [
- HotkeysService,
- { provide : HotkeyOptions, useValue : options }
- ]
- }
- }
-}
-export * from './hotkeys.module'
+export * from './hotkeys.component'
\ No newline at end of file