diff options
| author | Misko Hevery | 2013-03-20 16:24:23 -0700 |
|---|---|---|
| committer | Misko Hevery | 2013-04-02 14:05:06 -0700 |
| commit | 0b6f1ce5f89f47f9302ff1e8cd8f4b92f837c413 (patch) | |
| tree | 8cbc0c86024dd4f97d0aa54e0c9b7df9b0d56b86 /src/loader.js | |
| parent | 4bfb66ce0be46d3a0e9da2f80f3e1d0c2b559828 (diff) | |
| download | angular.js-0b6f1ce5f89f47f9302ff1e8cd8f4b92f837c413.tar.bz2 | |
feat(ngAnimate): add support for animation
Diffstat (limited to 'src/loader.js')
| -rw-r--r-- | src/loader.js | 27 |
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. |
