forked from brtnshrdr/angular2-hotkeys
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
29 lines (27 loc) · 1016 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {NgModule, ModuleWithProviders} from '@angular/core';
import {CommonModule} from '@angular/common';
import {HotkeysDirective} from './src/hotkeys.directive';
import {CheatSheetComponent} from './src/cheatsheet.component';
import {IHotkeyOptions, HotkeyOptions} from './src/hotkey.options';
import {HotkeysService} from './src/hotkeys.service';
export * from './src/cheatsheet.component';
export * from './src/hotkey.model';
export * from './src/hotkey.options';
export * from './src/hotkeys.directive';
export * from './src/hotkeys.service';
@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}
]
};
}
}