angular2-hotkeys
angular2-hotkeys copied to clipboard
Cheatsheet template
Could you please possibility to change template of hotkeys cheatsheet?
Please advice, Thanks in advance
I'm not currently adding any features to this project unfortunately (I no longer with with Angular at my job), but I'd love a pull request!
The rest of the project is not actually tied to the example cheatsheet. You can create your own fairly easily and modify it how you like (give it a different selector of course).
I'd start with the example here to figure out how it's done
Should be pretty possible to make your own cheat sheet by simply subscribing to
this.hotkeysService.cheatSheetToggle
And build your own component with a different selector than hotkeys-cheatsheet and then you can do whatever you want.
I'll see if I can get this into the documentation because this seems like something more people would want to do. Just supplying your own template (and presumably css) seems like it would be a bit convoluted so I think I prefer the idea of just documenting better how to build your own cheat sheet.
@wittlock any update on this? Even a short word in the documentation would be of great help :slightly_smiling_face:
@rigelk You just need to take a copy of the original cheat sheet and change the html / logic to do what you like. It does the this.hotkeysService.cheatSheetToggle
subscription inside it. All you need to do is replace your <hotkeys-cheatsheet></hotkeys-cheatsheet>
with your copy (using a different selector)