Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4374f89

Browse files
PatrickJSpetebacondarwin
authored andcommitted
fix($animate): applyStyles from options on leave
Closes #10068
1 parent caa0b9d commit 4374f89

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ng/animate.js

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ var $AnimateProvider = ['$provide', function($provide) {
210210
* @return {Promise} the animation callback promise
211211
*/
212212
leave: function(element, options) {
213+
applyStyles(element, options);
213214
element.remove();
214215
return asyncPromise();
215216
},

test/ng/animateSpec.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,11 @@ describe("$animate", function() {
148148
$rootScope.$digest();
149149
assertColor('blue');
150150

151-
$animate.leave(element, 'off', {
152-
to: { color: 'blue' }
151+
$animate.leave(element, {
152+
to: { color: 'yellow' }
153153
});
154-
assertColor('blue'); //nothing should happen the element is gone anyway
154+
$rootScope.$digest();
155+
assertColor('yellow');
155156

156157
function assertColor(color) {
157158
expect(element[0].style.color).toBe(color);

0 commit comments

Comments
 (0)