As seen in the previous lesson, reusable animations allow you to define an animation once and use it multiple times across your Angular application. But what if you want to adjust the timing, delay, or other properties slightly for different circumstances? That is where input parameters come into play. Just about any parameter of an animation can be adjusted through the use of the useAnimation() method along with custom input values.
- [Instructor] As we saw in the previous lesson,…reusable animations allow us to define an animation once…and use it multiple times across our angular application.…But what if we want to adjust the timing, delay, or other…properties to adjust slightly for different circumstances.…This is where input parameters will come into play.…Let's pop over to our animations.ts file.…And I'm going to replace our current fadeAnimation…which as you can see here has all…sorts of values predefined.…
I'll replace this with a modified version from…our snippets file, which instead uses various input…parameters for things like time, delay, to and from.…And you can see that this works with just regular, angular…data binding.…Let's go ahead and save.…So this prepares our reusable animation…to accept input parameters.…
Now we have to go over to whatever's using…this animation and set it up a little bit differently…how it actually invokes useAnimation.…So go back into fadeblock.component and let's actually…replace our trigger here.…You'll notice that all we're…
- Installing the Angular CLI
- Creating a new project
- Verifying the animations package
- Configuring project routes
- Animating components
- Triggering animation between states
- Stepped and parallel animation
- Writing reusable animations
- Animating individual items with query and stagger
- Animating an existing Angular project
Skill Level Intermediate
1. Getting Ready to Animate
2. Enabling Angular Animations
3. Angular Animation Basics
4. Advanced Angular Animation
5. Animating an Existing Interface
6. Package for Distribution
Building the project1m 56s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.