I would like to animate ngRepeat
on a SVG element, with Angular 1.2.0rc3, but I can't find the reason why my code doesn't work.
Actually, the following code works perfectly:
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100">
<rect ng-repeat="item in itemsList" width="10" height="50" fill="gold" data-ng-attr-x="{{$index*15}}" class="animation" />
</svg>
<div>
<div ng-repeat="item in itemsList" class="animation">[{{$index}}] {{item}}</div>
</div>
.animation.ng-enter,
.animation.ng-leave
{
transition-property: opacity;
transition-duration: 2000ms;
}
.animation.ng-enter.ng-enter-active,
.animation.ng-leave
{
opacity: 1;
}
.animation.ng-enter,
.animation.ng-leave.ng-leave-active
{
opacity: 0;
}
But for some mysterious reason, when I put these lines in my real project, the <rect>
elements aren't animated anymore. The <div>
elements, however, are still animated. And finally, when I manually add the .ng-leave
and .ng-leave-active
classes on an existing element, with Firebug for instance, i can see the <rect>
progressively disappear, as expected. A pretty nice Heisenbug, right?
Notice that I also use jQuery in my project.
Does someone already has encountered a similar issue, or simply has an idea of what is happening?