drtobal drtobal - 4 months ago 11
AngularJS Question

disable nganimate for some elements

I'm using the ngAnimate module, but all my

ng-if
,
ng-show
, etc, are affected by that, I want to leverage ngAnimate for some selected elements.
For performance and some bugs in elements that shows and hide very speedy.

thanks.

Answer

Just add this to your CSS. It is best if it is the last rule:

.no-animate {
   -webkit-transition: none !important;
   transition: none !important;
}

then add no-animate to the class of element you want to disable. Example:

<div class="no-animate"></div>