blob: 7d420587ea905404a798a655268dc3268337feef (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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 }
]
}
}
}
|