现在说我有这些:
var ngModule = angular.module('MyApp', ['ngAnimate']);
ngModule.animation('.my-crazy-animation', function() {
return {
enter: function(element, done) { ... },
leave: function(element, done) { ... },
move: function(element, done) { ... },
beforeAddClass: function(element, className, done) { ... },
addClass: function(element, className, done) { ... },
beforeRemoveClass: function(element, className, done) { ... },
removeClass: function(element, className, done) { ... }
};
});
但是如何调用enter
,leave
函数?请举例说明调用$animate.enter()
?