Angular.js: Animate 1.2.0 - animating .ng-hide-add doesn't appear to work

Created on 9 Nov 2013  路  3Comments  路  Source: angular/angular.js

http://plnkr.co/edit/ri5c9KYdBeo1APxW3QUz?p=preview

.ng-hide-remove works fine in all my apps when updating to 1.2.0, but .ng-hide-add does not. Has the CSS required to make this work changed or is this a true bug?

Most helpful comment

You need to place display:block!important on the ng-hide-remove animation. Not sure why it didn't show up in the changelog. https://github.com/angular/angular.js/commit/9d69a0a7c75c937c0a49bb705d31252326b052df

All 3 comments

You need to place display:block!important on the ng-hide-remove animation. Not sure why it didn't show up in the changelog. https://github.com/angular/angular.js/commit/9d69a0a7c75c937c0a49bb705d31252326b052df

Take a look at the example here: http://docs.angularjs.org/api/ng.directive:ngShow#example

Thankful this isn't a bug! Maybe the note about !important should be elevated to a yellow note on the ngShow docs, so it is more obvious to newer users that they have to specify display: block !important on both -add and -remove.

Thanks @matsko

Was this page helpful?
0 / 5 - 0 ratings