Property
binding Passing data from Component to View Template. But we
cannot use any type of string concatenation with property binding. In the below
example
Property binding directly applied on property of DOM. Whereas string
interpolation internally converted to property binding before applied to the
DOM.
Interpolation is a special syntax that Angular converts into a property
binding. Interpolation is just a convenient alternative to property
binding. We cannot use all the places interpolation and property binding.
For example, we have a button on the html page and we want to make it enable
and disable as per the condition. At that time property binding will work where
as if we use interpolation the button becomes disabled or enabled all the time
even if its value changes.
No comments:
Post a Comment