From c53d4c94300c97dd005f9a0cbdbfa387294b9026 Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Mon, 13 May 2013 17:37:52 -0400 Subject: feat($animator): provide support for custom animation events --- src/ng/animator.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3