Angularjs v1.2.1 - ng-repeat animation - animation classes are not removed

早过忘川 提交于 2020-01-13 07:10:28

问题


I wrote a directive which displays a list of elements. After list change the old list moves to the left followed by the new one. To achieve this behavior use ng-repeat directive and css3 transitions. I noticed that animations classes(ng-animate ng-enter ng-animate-start ng-animate-active ng-enter-active) are not beeing removed after animation end and the old node ceated by ng-repeat loop is also not removed.

Example in plunker: http://plnkr.co/edit/gqRIIUJF55NNvlt9lqMz?p=preview

The problem occurs in firefox. Under chrome everything is fine.

I would be grateful if you tell me what I'm doing wrong, or if it is a angular issue.


回答1:


That's because the ng-animate/ng-animate-start... are removed since angularjs v1.2.0 so you don't need to use them, check the docs or this example by kevin-smets.



来源:https://stackoverflow.com/questions/20117511/angularjs-v1-2-1-ng-repeat-animation-animation-classes-are-not-removed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!