diff options
| author | Matias Niemelä | 2013-05-13 17:37:52 -0400 |
|---|---|---|
| committer | Igor Minar | 2013-05-16 16:17:46 -0700 |
| commit | c53d4c94300c97dd005f9a0cbdbfa387294b9026 (patch) | |
| tree | cc532da5b9f1f89afd263cd23921e86251568152 /src | |
| parent | 24ed61cf5c56f236a31069e60fbfdd3b578fbef3 (diff) | |
| download | angular.js-c53d4c94300c97dd005f9a0cbdbfa387294b9026.tar.bz2 | |
feat($animator): provide support for custom animation events
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/animator.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js index 7fc35f3c..2965717b 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -253,6 +253,20 @@ var $AnimatorProvider = function() { * @param {jQuery/jqLite element} element the element that will be rendered visible or hidden */ animator.hide = animateActionFactory('hide', noop, hide); + + /** + * @ngdoc function + * @name ng.animator#animate + * @methodOf ng.$animator + * + * @description + * Triggers a custom animation event to be executed on the given element + * + * @param {jQuery/jqLite element} element that will be animated + */ + animator.animate = function(event, element) { + animateActionFactory(event, noop, noop)(element); + } return animator; function animateActionFactory(type, beforeFn, afterFn) { |
