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
Post a Comment