Data Binding
Data Binding
Data Binding is the process of connecting a target (such as a DOM element, property, or event) in a template to a model (data or behavior) in the component. This process lets the template to dynamically reflect changes in the component's state or execute actions based on user interactions, using template expressions or template statements.
In Angular, data binding is used to establish communication between component class to view template and view template to the component class.
Types of Data Binding
There are two types of Data Binding in Angular −
The diagram below shows the categorization of data binding −

One-Way Data Binding
One-way data binding is a one-directional interaction between a component and its template. The data flows either from component to its corresponding template or template to the component. If you perform any changes in your component, then it will reflect in the HTML elements.

One-way data binding can be achieved through the following ways −
Two-way Data Binding
Two-way data binding is a two-way interaction where data flows in both ways, from component to views and views to component at the same time. If you do any changes in your property (or model) then, it reflects in your view and vice-versa. It is the combination of property and event binding.
