I've set up a Plunker with some example code: http://plnkr.co/edit/upExTHzpkwtZ45mdikFr?p=preview
The very succinct question is: I'm trying to use AngularJS' ng-keyUp directive. In the docs I've only seen is used on an input, although I'm trying to capture keypresses anywhere on the page rather than just inside an input box. Like so:
// view
<div ng-keyup="keyPress($event)">
// The bulk of my controller's view goes in here
</div>
// inside controller
$scope.keyPress = function(e){
console.log(e);
}
Again, see the Plunker above for an example. Currently, it doesn't work at all and nothing is logged. How can I get it to work properly?
<div ng-click="keyPress($event)">because use on your page just click on your div. But maybe I don't understand your case.