Function listing and selection.

This commit is contained in:
Ben Vanik
2013-12-22 02:59:42 -08:00
parent a631ada0f7
commit 4ecdfed46f
16 changed files with 314 additions and 65 deletions

View File

@@ -24,3 +24,17 @@ module.directive('uiEnter', function() {
});
};
});
module.directive('uiEscape', function() {
return function($scope, element, attrs) {
element.bind("keydown keypress", function(e) {
if(e.which === 27) {
$scope.$apply(function(){
$scope.$eval(attrs.uiEscape);
});
e.preventDefault();
}
});
};
});