committed by
Peter Bacon Darwin
parent
e721169738
commit
ebd84e8008
@@ -210,6 +210,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
||||
* @return {Promise} the animation callback promise
|
||||
*/
|
||||
leave: function(element, options) {
|
||||
applyStyles(element, options);
|
||||
element.remove();
|
||||
return asyncPromise();
|
||||
},
|
||||
|
||||
@@ -148,10 +148,11 @@ describe("$animate", function() {
|
||||
$rootScope.$digest();
|
||||
assertColor('blue');
|
||||
|
||||
$animate.leave(element, 'off', {
|
||||
to: { color: 'blue' }
|
||||
$animate.leave(element, {
|
||||
to: { color: 'yellow' }
|
||||
});
|
||||
assertColor('blue'); //nothing should happen the element is gone anyway
|
||||
$rootScope.$digest();
|
||||
assertColor('yellow');
|
||||
|
||||
function assertColor(color) {
|
||||
expect(element[0].style.color).toBe(color);
|
||||
|
||||
Reference in New Issue
Block a user