angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ng:animate does not generate move animation on ng:repeat.

Open akoprow opened this issue 13 years ago • 36 comments

The following example illustrates what I mean: http://jsbin.com/OgAloNi/2/edit.

It displays a list of entries together with buttons to add a new entry at the beginning or end and to sort the list of entries. Adding new entries at the beginning or end make other elements move, but no move animations are triggered (only sorting triggers them).

Is that expected behavior? I would be surprised. This issue bites me because I would like to display a list of elements from left to right and then nicely animate repositioning elements to appropriate places when the list changes. For that it would be convenient if elements whose index changed triggered 'move' animation; on a related note it would be great if $index and related variables would be updated prior to triggering animations, so that one could rely on their updated values.

akoprow avatar Nov 27 '13 02:11 akoprow

Waiting for the solution...

OSSDeveloper avatar Jul 01 '15 20:07 OSSDeveloper

+1

dwanderton avatar Jul 05 '15 20:07 dwanderton

does anyone have an example of a recommended workaround in the mean time? maybe adding a class to all the siblings of the target element and then animating that class, then removing the class?

trickpattyFH20 avatar Jul 07 '15 18:07 trickpattyFH20

+1

toobstar avatar Jul 13 '15 23:07 toobstar

+1

sokolandia avatar Jul 14 '15 23:07 sokolandia

+1

nederev avatar Aug 17 '15 15:08 nederev

+1

mjduijn avatar Aug 29 '15 09:08 mjduijn

Been two years, from what I can see there still isn't a good workaround for this...

jvgeee avatar Sep 10 '15 07:09 jvgeee

+1

monsterxxx avatar Oct 18 '15 11:10 monsterxxx

+1

chogarcia avatar Dec 01 '15 20:12 chogarcia

+1

accraze avatar Jan 13 '16 01:01 accraze

+1

trickpattyFH20 avatar Jan 14 '16 16:01 trickpattyFH20

+1

Martinsos avatar Feb 15 '16 16:02 Martinsos

+1

JianJiao avatar Mar 15 '16 23:03 JianJiao

+1

DrewJordan avatar May 04 '16 12:05 DrewJordan

In lieu of a useless +1 I will say that yes I too would love to have move be triggered when elements are added/removed from a list, not just reordered. As mentioned, any time an element's index in the array changed.

Tathanen avatar Aug 17 '16 16:08 Tathanen