Property Binding
People often describe property binding as one-way data binding because it flows a value in one direction, from a component's data property into a target element property.
The following binding pairs do the same thing
When setting an element property to a non-string data value, you must use property binding.
Target - Element Property
Target - Component Property
In template of Parent Component
In ts of Child Component
It's a one way data binding from the selectedHero property of the HeroesComponent to the hero property of the target element, which maps to the hero property of the HeroDetailComponent.
Target - Directive Property
Last updated
Was this helpful?