aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/loader.js')
-rw-r--r--src/loader.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/loader.js b/src/loader.js
index ecb16608..5b74a4f3 100644
--- a/src/loader.js
+++ b/src/loader.js
@@ -165,6 +165,33 @@ function setupModuleLoader(window) {
/**
* @ngdoc method
+ * @name angular.Module#animation
+ * @methodOf angular.Module
+ * @param {string} name animation name
+ * @param {Function} animationFactory Factory function for creating new instance of an animation.
+ * @description
+ *
+ * Defines an animation hook that can be later used with {@link ng.directive:ngAnimate ngAnimate}
+ * alongside {@link ng.directive:ngAnimate#Description common ng directives} as well as custom directives.
+ * <pre>
+ * module.animation('animation-name', function($inject1, $inject2) {
+ * return {
+ * //this gets called in preparation to setup an animation
+ * setup : function(element) { ... },
+ *
+ * //this gets called once the animation is run
+ * start : function(element, done, memo) { ... }
+ * }
+ * })
+ * </pre>
+ *
+ * See {@link ng.$animationProvider#register $animationProvider.register()} and
+ * {@link ng.directive:ngAnimate ngAnimate} for more information.
+ */
+ animation: invokeLater('$animationProvider', 'register'),
+
+ /**
+ * @ngdoc method
* @name angular.Module#filter
* @methodOf angular.Module
* @param {string} name Filter name.