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

Animating the playback overlay - Angular Tutorial

From the course: Angular: Animations

Start my 1-month free trial

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…

Contents