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.

Configuring router animation

Configuring router animation - Angular Tutorial

From the course: Angular: Animations

Start my 1-month free trial

Configuring router animation

- [Narrator] We've already set up routes for our application and have a set of navigation elements to control them. At present, the router views simply appear and disappear without any transition whatsoever. Angular 4.2 and above allows the actual animation of routers supporting much of the same structures we've seen previously. But as one would imagine, routers require an additional set of structures to use effective animated transitions between them. The first thing we need to do is add some data to our roots. So inside of our animation roots constant, with an app.module. Right after our component definition for each one of these routes, we're going to pass in some data. I have a little snippet here I'll paste in, and this is data which contains an animation object which has a property called value set to a string. We're going to make this string match whatever's after the dash here, it doesn't have to, but it makes sense for our purposes. So for instance, inside my animation basics…

Contents