AngularJS ng-keydown directive only working for <input> context?
问题 I am pretty new to AngularJS but found it quite to my liking so far. For my current project I need hotkey functionality and was happy to see that it is supported since the 1.1.2 release. The ng-keydown directive (http://code.angularjs.org/1.1.3/docs/api/ng.directive:ngKeydown) works as expected for input types but fails me for any other context like div etc. which seems odd given that the documentation says otherwise. Here is an minimal example (http://jsfiddle.net/TdXWW/12/) of the working