Data Binding is used bind the View (Html content) with Controller’s (Component’s) field. That is whenever we display dynamic data on a view (HTML) from Component, data binding is used.
Angular provides various types of data binding
1.Property 2.Attribute 3.Class 4.Style
Here we bind a property of a DOM element to a field which is a property we define in our component typescript code.
Here we bind attribute of an element with the field of a component.
Class binding is used when we want to add additional classes to an element based on some condition.
Here we bind a component field to our inline HTML styles.