1 Answers
What is data binding in AngularJS
Data binding in AngularJS refers to the automatic synchronization of data between the model and the view components. This means that any changes made to the model are reflected in the view and vice versa without the need for manual intervention.
Types of data binding supported in AngularJS
There are two main types of data binding supported in AngularJS:
- One-way data binding: In one-way data binding, the data flows only from the model to the view or from the view to the model. Changes made in one direction do not affect the other. This is achieved using expressions or interpolation in the HTML templates.
- Two-way data binding: Two-way data binding allows for automatic synchronization of data between the model and the view in both directions. Any changes made in the model are immediately reflected in the view, and any changes made in the view update the model. This is typically implemented using directives such as ng-model.
Please login or Register to submit your answer