$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'); }; });