How to animate list reordering in Angular 2

I have a list of items bound to an array via Observable. My application has an action effect when one of these items in the list gets a property change, causing it to reorder to the end of the array (currently implemented in code with a full-sized .sort () on the array).

I would like it to actually look like the item in the visual list is animating from its original position (in the array) to its new position (at the end of the list), moving from location X to location Y.

Is this possible with Angular animations? I am more than willing to stop using Array.sort () and just move the element programmatically through the splice () call.

+3


source to share


1 answer


I don't know how relevant this is. But this plugin has to do the trick with some configuration.



https://isotope.metafizzy.co/

0


source







All Articles