Skip to content

Instantly share code, notes, and snippets.

@ericwwsun
Created March 21, 2014 19:33
Show Gist options
  • Save ericwwsun/9694363 to your computer and use it in GitHub Desktop.
Save ericwwsun/9694363 to your computer and use it in GitHub Desktop.
[Javascript] [Angular] Capturing document level keypress events in AngularJS
<html lang="en" ng-controller="AppController" ng-keyup="keyup($event)">
var AppController = function($scope) {
$scope.keyup = function(keyEvent) {
console.log('keyup', keyEvent);
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment