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 - Angular Tutorial
From the course: Angular: Animations
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Self-contained component animation6m 43s
-
(Locked)
Writing reusable animations5m 25s
-
(Locked)
Animation input parameters3m 58s
-
(Locked)
Configuring router animation6m 53s
-
(Locked)
Selecting items with a query6m 20s
-
(Locked)
Using Stagger within an animation1m 37s
-
(Locked)
Challenge: Per-page router animations23s
-
(Locked)
Solution: Per-page router animations2m 1s
-
(Locked)
-
-
-