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.
Animating the playback overlay - Angular Tutorial
From the course: Angular: Animations
Animating the playback overlay
- [Instructor] We'll now configure our trigger, states and animations for the play-overlay components. This will be very similar to the animations created for the video-title component, but will add in some scale and color transitions as well. Of course, with anything, we need to import our animations classes, so here we have trigger, state, style, animate and transition from animations, so nothing too complicated. And then within our template, we need to add the hiddenChanged trigger and base that on an isHidden attribute coming in from the parent component. We'll hook that up later. The next thing we need to do is actually define our animations within the component metadata. As mentioned before, these are going to be a bit more complicated than what we saw with the video-title. Here, I'm pasting in this snippet from our snippets file. The trigger is, of course, hiddenChanged, which we see right here. And we're going between states of false and true. These are strings so on a false…
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
-
-
-
-
-
-
-
Video playback overview1m 18s
-
(Locked)
Adding animation packages3m 31s
-
(Locked)
Old animation cleanup1m 51s
-
(Locked)
Creating Angular components2m 57s
-
(Locked)
Component instantiation and data value translation4m 3s
-
(Locked)
Animating the video title2m 58s
-
(Locked)
Animating the playback overlay3m 6s
-
(Locked)
Providing playlist motion3m 31s
-
(Locked)
Challenge: Transition the toolbar with a fade28s
-
(Locked)
Solution: Transition the toolbar with a fade3m 21s
-
-
-