diff options
| author | Ben McCann | 2013-09-26 11:29:40 -0700 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-09-26 22:09:34 +0100 |
| commit | 147c6929a264a7b077a5f2cfc5aa9a0b9513acd7 (patch) | |
| tree | 6dd9ec3d43c565d198e995710aaf64a0a1ae1b5e | |
| parent | 0a63adce687d28ada90ea930d5e69883cc11cba5 (diff) | |
| download | angular.js-147c6929a264a7b077a5f2cfc5aa9a0b9513acd7.tar.bz2 | |
feat(ngEventDirectives): add `ngCopy`, `ngCut`, and `ngPaste`
Closes #4172, #4170
| -rw-r--r-- | src/ng/directive/ngEventDirs.js | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index b706a18d..d0bb0c59 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 keypress submit focus blur'.split(' '), + 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '), function(name) { var directiveName = directiveNormalize('ng-' + name); ngEventDirectives[directiveName] = ['$parse', function($parse) { @@ -294,3 +294,48 @@ forEach( * @example * See {@link ng.directive:ngClick ngClick} */ + +/** + * @ngdoc directive + * @name ng.directive:ngCopy + * + * @description + * Specify custom behavior on copy event. + * + * @element window, input, select, textarea, a + * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon + * copy. (Event object is available as `$event`) + * + * @example + * See {@link ng.directive:ngClick ngClick} + */ + +/** + * @ngdoc directive + * @name ng.directive:ngCut + * + * @description + * Specify custom behavior on cut event. + * + * @element window, input, select, textarea, a + * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon + * cut. (Event object is available as `$event`) + * + * @example + * See {@link ng.directive:ngClick ngClick} + */ + +/** + * @ngdoc directive + * @name ng.directive:ngPaste + * + * @description + * Specify custom behavior on paste event. + * + * @element window, input, select, textarea, a + * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon + * paste. (Event object is available as `$event`) + * + * @example + * See {@link ng.directive:ngClick ngClick} + */ |
