chore($animate): replace show/hide with addClass/removeClass

This commit is contained in:
Matias Niemelä
2013-07-23 23:02:15 -04:00
committed by Misko Hevery
parent 81923f1e41
commit 8ed0d5b6aa
8 changed files with 52 additions and 138 deletions

View File

@@ -366,12 +366,12 @@ directive.foldout = ['$http', '$animate','$window', function($http, $animate, $w
//avoid showing the element if the user has already closed it
if(container.css('display') == 'block') {
container.css('display','none');
$animate.show(container);
$animate.addClass(container, 'ng-hide');
}
});
}
else {
container.hasClass('ng-hide') ? $animate.show(container) : $animate.hide(container);
container.hasClass('ng-hide') ? $animate.removeClass(container, 'ng-hide') : $animate.addClass(container, 'ng-hide');
}
});
});