angular-hotkeys
angular-hotkeys copied to clipboard
Calling Mousetrap.trigger fails
If you call Mousetrap.trigger('?') it ends up with error.
Quick bugfix didn't help: Surrounding $rootScope.apply with $timeout http://stackoverflow.com/a/18996042
The more info you provide in a bug report, the higher the chances I'll be able to fix it. Could you provide a plunkr or at least the error you're getting?
http://plnkr.co/edit/hutNuYRotIyJYqqAYZk2?p=preview
Thanks -- I've updated the plunkr to work (you can't link directly to raw.github as the mime types don't match)
http://plnkr.co/edit/YktmMkbN0O5CTN2LQngt
Any reason you want to trigger from outside hotkeys? If you simply want to show the cheatsheet, there is a service method (toggleCheatSheet) available to do that
F.e.:
- if you want to use Mousetrap directly
- any other plugin depends on Mousetrap