-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Also add .ng-hide-remove styling #3813
Comments
Just thought of this as well and this makes show/hide animations much easier. Thanks! :) |
…how/ngHide Since ngShow/ngHide animations add and remove the .ng-hide class, having to remember to write display:block on your own is a hassle and leads to problematic animation code. This fix places a default on the animation for you instead. Closes #3813
What happens when the element's display is not |
In 1.3, it doesn't matter since the selector is different. However for 1.2, since IE8 doesn't support the |
OK. It should have been documented as breaking change though. Setting the display with !important works of course, but I need to set it in all of the classes set by an animation. Whereas before, just setting properties on the minimum number of classes required to achieve the animation was enough. In anycase, thank you for the reply. It's clear what I must do. |
I wonder if something like |
The problem is that the 1.2 CSS code still has |
Ah, so that won't work. |
I also have a problem with this commit. I have an element that uses an infinite animation (without ngAnimate). While using ng-show (also without ngAnimate), when hiding the element,, there is a noticable delay until the element actually disappears. I guess $animate thinks there is an animation or something. See this plunker: http://plnkr.co/edit/5cfIXfNryNOzK66q9YWL?p=preview It's also inconvenient that the css rule is living in angular.css, which now prevents me from upgrading angular core beyond 1.2.16 |
AngularJS inject styling for .ng-hide in the
.ng-hide{display:none !important;}
This is fine, but causes confusion when animating with ng-show, because the element became visible at the end of the animation (not showing the animation at all, just a delay).
I suggest also injecting the css rule
.ng-hide-remove{display:block !important;}
The text was updated successfully, but these errors were encountered: