alisabzevari / NgHotkey

Provide hotkey functionality in AngularJS using Mousetrap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgHotkey

Provide hotkey functionality in AngularJS using Mousetrap

Getting Started

  1. Include nghotkey on your page
<script src="/path/to/mousetrap.min.js"></script>
<script src="/path/to/nghotkey.js"></script>
  1. Put nghotkey to your module dependencies
var app = angular.module('app', ['nghotkey']);
  1. Set hotkey for elements or directives using hotkey directive as an attribute
  <input type="text" hotkey="h ?" hotkey-action="keyup" />
  <input type="button" hotkey="ctrl+;"/>

About

Provide hotkey functionality in AngularJS using Mousetrap

License:Other


Languages

Language:JavaScript 100.0%Language:CSS 0.0%