Now that we have a service in place, we can use Angular to populate the video element source from within the service and also display the title and related data attributes through data binding. Data binding allows the view of an applictaion to automatically update once the data values change.
- [Voiceover] Now that we have a service in place,…we can use Angular to populate the video element source…from within the service, and also display the title…and related data attributes through data binding.…Data binding allows the view of an application…to automatically update once the data values change.…The first thing we'll do is add some additional…variable properties to our service.…So here these are two public properties.…This one is the current path to the video,…and the second one is the current title of the video.…
And I'll just keep this blank at first for "currentPath,"…and for our current title, again,…I'll just let the user know that hey,…we're loading it in right now.…To actually go ahead and get this into our component,…what we need to do is switch to app.component.ts…and inside of videoDisplay, here's our source…for videoDisplay, what we'll do is actually use…the double bracket just like this.…This indicates that we want to bind data here,…and that data itself is going to be based…off of our video service.…
- Setting up the project
- Using the Node Package Manager
- Building an Angular component
- Bootstrapping the application
- Creating a service
- Data binding
- Controlling sound and playback
- Animating player controls
Skill Level Intermediate
1. Setting Up the Project
2. Application Setup
3. Video Playback Basics
4. Playback Interactivity
5. Advanced Features
Building a details component3m 20s
- 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.