Hello,

I am new to Angular and I am stuck in a problem regarding animations.

I am playing with the directive "ngSwitch".

I want to apply animations when an item gets showed and when it gets hided.

When an item gets showed, I want to apply a "jQuery.fadeIn" animation.

When an item gets hided, I want to apply a "jQuery.fadeOut" animation.

I used the service "ngAnimate" to achieve this goal.

It's OK... but the result is not what I expect it to be.

I'd like the "fadeIn" animation to start after the "fadeOut" animation has 
completed.

Otherwise, both items (the items that disappears and the one that appears) 
get showed during a brief period of time.

I understand that both events are fired independently from each other.

I searched, but I found no way to "chain" the events.

JQuery's API offers a way to chain animations by passing a function that 
will be executed once an event's callback terminates. But, this solution is 
not applicable.

I found this post:

https://groups.google.com/forum/#!searchin/angular/animation$20chaining/angular/ZvhQ1s5RLo8/uRgM65DoqmgJ

It seems to be related to my question. However, it is said that:  

<< Looking for approaches to sequencing / chaining animation in different 
directives. >>

I my case, the animation executes within the same directive (the directive 
"ngSwitch", in this case).

Then my question is:

Is there a way to chain animations between to events that are triggered 
within the same directive? 

Thanks,

Denis

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to