1-HTML attribute vs. DOM property
The distinction between an HTML attribute and a DOM property is crucial to understanding how Angular binding works.Attributes are defined by HTML. Properties are defined by the DOM (Document Object Model).
-
A few HTML attributes have 1:1 mapping to properties.
idis one example.
-
Some HTML attributes don't have corresponding properties.
colspanis one example.
-
Some DOM properties don't have corresponding attributes.
textContentis one example.
-
Many HTML attributes appear to map to properties ... but not in the way you might think!


