Angularjs v1.2.1 - ng-repeat 动画 - 动画类未移除 [英] Angularjs v1.2.1 - ng-repeat animation - animation classes are not removed
问题描述
我编写了一个显示元素列表的指令.列表更改后,旧列表向左移动,然后是新列表.要实现此行为,请使用 ng-repeat 指令和 css3 转换.我注意到动画类(ng-animate ng-enter ng-animate-start ng-animate-active ng-enter-active)在动画结束后没有被删除,并且旧节点被 ng-重复循环也没有被删除.
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.
plunker 示例:http://plnkr.co/edit/gqRIIUJF55NNvlt9lqMz?p=preview
Example in plunker: http://plnkr.co/edit/gqRIIUJF55NNvlt9lqMz?p=preview
问题出现在 firefox 中.在 chrome 下一切正常.
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.
推荐答案
那是因为 ng-animate/ng-animate-start... 从 angularjs v1.2.0 开始被移除,所以你不需要使用它们,检查docs 或这个 kevin-smets 的示例.
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.
这篇关于Angularjs v1.2.1 - ng-repeat 动画 - 动画类未移除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!