angular-esc-key

Add this attribute to your element to trigger angular actions when the escape key is pressed.

Download .zip Download .tar.gz View on GitHub

$scope.things: {{ things }}

Try it:

<input type="text" esc-key="doStuff();things = 'escape pressed'" ng-model="things" />

Check out the source for this page for more details. All we used was this for the main.js file:

'use strict';
var app = angular.module('app', [ 'esc-key' ]);

app.controller('MainCtrl', function ($scope) {
  $scope.doStuff = function () {
    alert('subject');
  };
});