Interpolation bind is one of the easiest forms to bind in Angular. Binding coordinates communication between the component's class and its template, and often involves passing data. We can provide values from the class to the template for display, and the template raises events to pass user actions or user entered values back to the class. Here we demonstrate an example.
- [Instructor] In Angular, binding coordinates communication…between the component's class and its template.…Interpolation binding is one of…the easiest forms of binding in Angular.…So, we have this term Movie Catalogue which is hard coded.…Let's go ahead and use binding to replace it.…Binding's going to make it easier to change when coding.…So let's go ahead and start by adding a property…in the class for the title page.…In the Solution Explorer go ahead and open up the file…movie-list.component.ts…Now, let's go ahead and add a property…by the name of pageTitle,…and we'll go ahead and put that in our class.…
pageTitle:, and it will be a type of string…and we'll assign it a value of Movie List.…Now, let's go to the movie-list.component html…That's our template.…And here's where we will use the interpolation.…So all we need to do is replace Movie Catalogue…and enter a double curly brace…and type in pageTitle.…So now, when this page title is displayed,…Angular will display the property value…to the inner text of this div element.…
- Creating components
- Bootstrapping components
- Working with templates
- Using directives and interpolation
- Binding and transforming data
- Creating advanced and nested components
- Creating services
- Obtaining data with HTTP calls
- Configuring routes
Skill Level Intermediate
1. Course Overview
3. Directives, Interpolation, and Templates
5. Advanced Components
7. Obtaining Data with HTTP
- 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.