diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-09-11 15:07:31 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2018-09-11 21:33:22 +0200 |
commit | 7aba23d13fe56835b07ebb00c0b4c2a929551ec3 (patch) | |
tree | e67f5a28ec12d6250231d2450354390cd8ae9ce0 /client/src/app/core/hotkeys/hotkeys.module.ts | |
parent | 5284d4028c5db6e32b73b13731622ba477597561 (diff) | |
download | PeerTube-7aba23d13fe56835b07ebb00c0b4c2a929551ec3.tar.gz PeerTube-7aba23d13fe56835b07ebb00c0b4c2a929551ec3.tar.zst PeerTube-7aba23d13fe56835b07ebb00c0b4c2a929551ec3.zip |
wrap the hotkeys component to allow templating :art:
Diffstat (limited to 'client/src/app/core/hotkeys/hotkeys.module.ts')
-rw-r--r-- | client/src/app/core/hotkeys/hotkeys.module.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/client/src/app/core/hotkeys/hotkeys.module.ts b/client/src/app/core/hotkeys/hotkeys.module.ts new file mode 100644 index 000000000..7d420587e --- /dev/null +++ b/client/src/app/core/hotkeys/hotkeys.module.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | import { NgModule, ModuleWithProviders } from '@angular/core' | ||
2 | import { CommonModule } from '@angular/common' | ||
3 | import { HotkeysDirective, IHotkeyOptions, HotkeyOptions, HotkeysService } from 'angular2-hotkeys' | ||
4 | import { CheatSheetComponent } from './hotkeys.component' | ||
5 | |||
6 | export * from './hotkeys.component' | ||
7 | |||
8 | @NgModule({ | ||
9 | imports : [CommonModule], | ||
10 | exports : [HotkeysDirective, CheatSheetComponent], | ||
11 | declarations : [HotkeysDirective, CheatSheetComponent] | ||
12 | }) | ||
13 | export class HotkeyModule { | ||
14 | static forRoot (options: IHotkeyOptions = {}): ModuleWithProviders { | ||
15 | return { | ||
16 | ngModule : HotkeyModule, | ||
17 | providers : [ | ||
18 | HotkeysService, | ||
19 | { provide : HotkeyOptions, useValue : options } | ||
20 | ] | ||
21 | } | ||
22 | } | ||
23 | } | ||