aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngMock/angular-mocks.js
diff options
context:
space:
mode:
authorMatias Niemelä2014-02-14 04:02:46 -0500
committerIgor Minar2014-02-14 16:30:48 -0800
commit4f84f6b3e4210ae1eb14728a46d43dd961700a0c (patch)
tree7194406fbd76e553687200fb1a6a284ca8ca1e60 /src/ngMock/angular-mocks.js
parentcf5e463abd2c23f62e9c2e6361e6c53048c8910e (diff)
downloadangular.js-4f84f6b3e4210ae1eb14728a46d43dd961700a0c.tar.bz2
fix($animate): ensure $animate doesn't break natural CSS transitions
BREAKING CHANGE: ngClass and {{ class }} will now call the `setClass` animation callback instead of addClass / removeClass when both a addClass/removeClass operation is being executed on the element during the animation. Please include the setClass animation callback as well as addClass and removeClass within your JS animations to work with ngClass and {{ class }} directives. Closes #6019
Diffstat (limited to 'src/ngMock/angular-mocks.js')
-rw-r--r--src/ngMock/angular-mocks.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index 6b8868f7..ba79fc88 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -782,7 +782,8 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
}
};
- angular.forEach(['enter','leave','move','addClass','removeClass'], function(method) {
+ angular.forEach(
+ ['enter','leave','move','addClass','removeClass','setClass'], function(method) {
animate[method] = function() {
animate.queue.push({
event : method,