I\'m a little flummoxed when it comes to animating ng-move in an ng-repeat. If I move an array item from 3 to 7 for instance, items 4-7 get shifted up and they animate. However
The correct syntax is
arrayVar.splice(to, 0, arrayVar.splice(from, 1));
To remove and return an element at the index i
of array arr
, use arr.splice(i, 1)
,
@tasseKat has an excellent answer, which explains the behavior you observed: https://stackoverflow.com/a/27616435/1652643
However, his solution is not as simple as you would wish... but so far I haven't found anything better.