Learn how to set element property values to component property values.
- [Narrator] Property binding allows you…to set a property of a view element.…Property binding is referred to as being one way…because while you can set a property,…you cannot you it to read a property.…So to use property binding, you wrap brackets…around a property and bind it to a template expression.…So lets go ahead and give this a try in our own project.…As you can see in the code from the previous clip,…on line seven regarding style binding,…we can see that style binding is…actually a form of property binding.…
You can use property binding on any element attributes.…For instance, we can use property binding…to define the source attribute of an image tag.…So let's go ahead and remove our paragraph.…And write an image.…And we do property binding around source.…And we'll make equal a property called logoUrl.…Coming down here, let's get rid…of everything in our component code.…
logoUrl equals and as you can see…I pasted in a url to linked.in and linkedinlogopng.…Let's save it.…And we'll go back to the browser and there we go.…
- How components work
- Defining HTML templates
- Defining CSS
- Class binding and style binding
- Property binding and event binding
- Creating routes for navigation
Skill Level Intermediate
Angular Essential Trainingwith Justin Schwartzenberger2h 48m Intermediate
Angular 2: Widget-Based Architectureswith Derek Peruo52m 18s Intermediate
1. Getting Up and Running with Angular
2. Templating Basics
3. Data Binding
5. Tying It All Together
- 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.