diff options
Diffstat (limited to 'src/loader.js')
| -rw-r--r-- | src/loader.js | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/loader.js b/src/loader.js index 712ff0f7..b28ccee2 100644 --- a/src/loader.js +++ b/src/loader.js @@ -173,24 +173,30 @@ function setupModuleLoader(window) { * @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. + * **NOTE**: animations are take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with {@link ngAnimate.$animate $animate} service and + * directives that use this service. + * * <pre> - * module.animation('animation-name', function($inject1, $inject2) { + * 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) { ... } + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } * } * }) * </pre> * - * See {@link ng.$animationProvider#register $animationProvider.register()} and - * {@link ng.directive:ngAnimate ngAnimate} for more information. + * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. */ - animation: invokeLater('$animationProvider', 'register'), + animation: invokeLater('$animateProvider', 'register'), /** * @ngdoc method |
