In this video, discover one method of clearing text content within an HTML element through the use of a timer to ensure the user has enough time to digest the message once it is delivered to the DOM.
(upbeat music) … - [Instructor] The solution I took … for this particular challenge is pretty straightforward. … Inside of our animbox.component.ts file, if we look … at the bottom past all the animations … to where we export our class, I've added … in animationEnd a setTimeout. … Here, we have setTimeout clear out our message text … to an empty string. … And what we do is we set a timeout of three seconds. … That should allow the user ample time to read … and process the message. … Let's go ahead and see this in action. … So here we are in our app and I'm going to choose … one of these selections. … We can see the message appears, it completes, … and after three seconds it goes away. … Perfect. … …
- 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.