aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatias Niemelä2013-05-13 17:37:52 -0400
committerIgor Minar2013-05-16 16:17:46 -0700
commitc53d4c94300c97dd005f9a0cbdbfa387294b9026 (patch)
treecc532da5b9f1f89afd263cd23921e86251568152 /src
parent24ed61cf5c56f236a31069e60fbfdd3b578fbef3 (diff)
downloadangular.js-c53d4c94300c97dd005f9a0cbdbfa387294b9026.tar.bz2
feat($animator): provide support for custom animation events
Diffstat (limited to 'src')
-rw-r--r--src/ng/animator.js14
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) {