diff options
| author | Mark Nadig | 2013-03-05 10:43:06 -0700 |
|---|---|---|
| committer | Pawel Kozlowski | 2013-03-08 21:56:32 +0100 |
| commit | f20646bce5f0c914992a78fc2556bda136c27ac9 (patch) | |
| tree | 41884f1f286a5a118092c03414a67b91f45f9a74 /src/ng/directive/ngEventDirs.js | |
| parent | 65e57a7c3d53fad536797301fe59b5912ed4db16 (diff) | |
| download | angular.js-f20646bce5f0c914992a78fc2556bda136c27ac9.tar.bz2 | |
feat(directive): add ngKeypress directive for handling keypress event
Diffstat (limited to 'src/ng/directive/ngEventDirs.js')
| -rw-r--r-- | src/ng/directive/ngEventDirs.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index e2aedd7f..197db5ac 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -37,7 +37,7 @@ */ var ngEventDirectives = {}; forEach( - 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup'.split(' '), + 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress'.split(' '), function(name) { var directiveName = directiveNormalize('ng-' + name); ngEventDirectives[directiveName] = ['$parse', function($parse) { @@ -198,6 +198,22 @@ forEach( /** * @ngdoc directive + * @name ng.directive:ngKeypress + * + * @description + * Specify custom behavior on keypress event. + * + * @element ANY + * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon + * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) + * + * @example + * See {@link ng.directive:ngClick ngClick} + */ + + +/** + * @ngdoc directive * @name ng.directive:ngSubmit * * @description |
