javascript - AngularJS keypress event listener - NOT INPUT ELEMENT -


i trying create div responds keypress events, arrow , down arrow. when div open, want window/document respond specific keypress events. i've seen jquery solutions, i'd rather not use jquery. what's best way accomplish this?

specifically, have different audio volume images , want these images change each keypress.

    $scope.keypress = function($event) {      $scope.key = $event.keycode      }; 

you can write in div ng-keydown="keypress($event)" codepen url reference-http://codepen.io/nagasai/pen/beeqre

    -


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -