Wednesday, June 24, 2015

What is Data Binding in AngularJS?

Data binding is the feature by which the data from the model is bound to the View in an MVC (Model View Controller) representation, the Controller controls the way the model is bound to the view. AngularJS supports MVC pattern and allows binding model data to the view layer.
AngularJS supports both one-way and two-way data binding between the model and the view, depending on the need one can use any one of these bindings. The ng-bind directive enables one-way data binding and the ng-model directive enables two-way data binding.

As the name suggests one-way data binding is unidirectional the data from the model is bound to the view and not vice versa, two-way data binding binds data from the model to the view and any changes made in the view are reflected back in the corresponding model object/properties.  

Search Flipkart Products:
Flipkart.com

No comments: