From the course: Angular: Animations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using Stagger within an animation

Using Stagger within an animation - Angular Tutorial

From the course: Angular: Animations

Start my 1-month free trial

Using Stagger within an animation

- [Instructor] Stagger works alongside query in order to animate the selected elements individually one after the other using a delay in between each segment of an animation. This allows a much more dynamic animation as each element is rendered separately instead of everything at once. There actually isn't a whole lot to do to get this working. We need to add stagger to our imports and then just adjust our query. So here we have our present query. Let's remove that and paste in a snippet for the new query. You can see that almost all of it looks exactly the same. We just have this extra piece here defining our stagger. We're setting stagger to 100 milliseconds. So what should happen is that between each single block being animated should be a staggered delay of 100 milliseconds. To see this in action, save your file. It'll recompile, and then we'll pop over to the browser to check it out. All right, going to advanced, we can see our fade block fade out, and now when we show spoons, we…

Contents