ng-animate

Example of ngAnimate for smoothly sorting an ng-repeat?

孤街醉人 提交于 2019-11-26 17:21:11
问题 I would like to see a functional example of using angular-animate (1.2x) to sort a list. (I have only come across broken fiddles etc on the interwebs): An ng-repeat given an array [A,B,C] and later [C, B, A] should: Move A to the bottom Move C to the top Keep B's position (Using CSS absolute top positioning or similar.) An example using staggering (transition-delay) is a bonus. 回答1: The problem Achieving what you want can be a bit tricky. A common attempt is to use ng-style to calculate the

disable nganimate for some elements

Deadly 提交于 2019-11-26 10:26:07
问题 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. 回答1: 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> 回答2: If you