Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotkey shorcut click element in directive. close #197 #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AbraaoAlves
Copy link

Allow use hotkey like this:

<!-- Press "ctrl+q" to trigger click and 'doSomething()' -->
<button ng-click="doSomething()" hotkey="ctrl+q"> 
<!-- If element is disabled, handler is not triggered -->
<button ng-click="doSomething()" hotkey="ctrl+q" ng-disabled="expression"> 

[note]: this PR put event.preventDefault in click event, assuming that ng-click is present.
Fixes #197

@javisperez
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants