Data binding allows to connect data of your Angular application with the DOM.
There are three kinds of data binding:
๐ ๐๐ซ๐จ๐ฉ๐๐ซ๐ญ๐ฒ ๐๐ข๐ง๐๐ข๐ง๐
Allows component values to be evaluated and displayed in your HTML template.
Below in the HTML thanks to brackets, ie: [src].
TS:
HTML:
๐ ๐๐ฏ๐๐ง๐ญ ๐๐ข๐ง๐๐ข๐ง๐
Allows to raise template events to the related component.
Below in the HTML thanks to parenthesis, ie: (click)
HTML:
TS:
๐ ๐๐ฐ๐จ-๐ฐ๐๐ฒ ๐๐ข๐ง๐๐ข๐ง๐
Does both previous ones.
Component data modification are immediately repercussed on the template and same for template to component repercussions.
HTML:
๐๐จ๐ง๐๐ฅ๐ฎ๐ฌ๐ข๐จ๐ง:
๐๐๐ญ๐ ๐๐ข๐ง๐๐ข๐ง๐ ๐๐ฅ๐ฅ๐จ๐ฐ๐ฌ ๐ญ๐จ ๐๐จ๐ง๐ง๐๐๐ญ ๐ฒ๐จ๐ฎ ๐๐ง๐ ๐ฎ๐ฅ๐๐ซ ๐๐ฉ๐ฉ ๐ฐ๐ข๐ญ๐ก ๐๐๐ ๐๐ฒ ๐ ๐๐ข๐๐๐๐ซ๐๐ง๐ญ ๐ฆ๐๐ง๐ง๐๐ซ๐ฌ: ๐ฉ๐ซ๐จ๐ฉ๐๐ซ๐ญ๐ฒ ๐๐ข๐ง๐๐ข๐ง๐ , ๐๐ฏ๐๐ง๐ญ ๐๐ข๐ง๐๐ข๐ง๐ , ๐๐ง๐ ๐ญ๐ฐ๐จ-๐ฐ๐๐ฒ ๐๐ข๐ง๐๐ข๐ง๐ .