Bindings
Last updated
Was this helpful?
Last updated
Was this helpful?
Binding types can be grouped into three categories distinguished by the direction of data flow:
source-to-view ( [ ], bind- )
view-to-source ( (), on- )
view-to-source-to-view ( [()], bindon- )
The target name is the name of a property. It may look like the name of an attribute but it never is.
Attributes are defined by HTML. Properties are defined by the DOM (Document Object Model).
A few HTML attributes have 1:1 mapping to properties. id
is one example.
Some HTML attributes don't have corresponding properties. colspan
is one example.
Some DOM properties don't have corresponding attributes. textContent
is one example.
Many HTML attributes appear to map to properties
HTML Attributes
initializeDOM properties
and then they are done.DOM Property
values can change;HTML attribute
values can't.