Re: Animating changes to arrays

794 views
Skip to first unread message

Nick Porter

unread,
Jun 14, 2013, 9:14:01 AM6/14/13
to ang...@googlegroups.com
Thanks Andy that was really helpful and what I was looking for. Amazing that it seems so easy.

On Tuesday, July 10, 2012 10:48:48 PM UTC-5, Andy Joslin wrote:
An animation when an item is added to the array is easy, you will just do the fade in or whatever on the element's creation.

An animation when an item is removed from the array... well, you have to do the animation then remove the item from the array.  But still not *that* hard.

Here's an example: http://jsfiddle.net/R2yUC/

Casey Kiernan

unread,
Jun 15, 2013, 9:09:17 AM6/15/13
to ang...@googlegroups.com
Brian; 


Casey 

On Tuesday, July 10, 2012 8:33:40 PM UTC-7, Brian Victor wrote:
I searched for transitions and animation in the group before posting, but most of the posts on the topic seemed to pertain to animating partials and routes.

I have a situation where users can add and remove items from an array. Unfortunately, just changing the DOM is so abrupt that it's hard to tell sometimes what's going on. I would really like changes to be animated somehow; what the animation is isn't that important to me.

Here's a jsfiddle demonstrating the situation.

http://jsfiddle.net/2brhn/

Is there any way to make those transition animations happen?

--
Brian

Andy Joslin

unread,
Jun 15, 2013, 4:56:51 PM6/15/13
to ang...@googlegroups.com
@Nick You should use ng-animate now, with angularjs 1.1.5+, soon to be in angular 1.2 :-)

Reply all
Reply to author
Forward
0 new messages