Understanding Two-Way Data Binding in AngularJs

Hands down two-way data binding is one of the biggest strengths of AngularJs. Because now, it seems impossible to work without it. Because this was so NEEDED! So, let us get straight into it and understand it to the core.



Before Two-Way Binding, View and Model were two separate entities and there was no relation between them as such that the changes could be in sync, hence it was the responsibility of the developer to capture the changes in the view and reflect them on a model, and similarly changes done at model been reflected in the view. The diagram below represents the earlier traditional approach of data binding.




Now. with DATA -BINDING in AngularJS, View reflects the changes in model bound by ng-model and the model reflects the changes in the view which are given in the {{}}brackets. Here, there is no role of controller and need for a developer to sync them, hence it has made coding excessively easier. Here, the view knows to bind through the model present in the ng-model which is “user” here. And view would reflect the changes and directly bind the model’s value through {{}}



Hope, it would have made you clear with the data binding concept. If you still have any doubt, leave it in the comment section below. Our team would revert within 24 hours.

Do Follow our Facebook page https://www.facebook.com/lovebeingengineer/.

If you are looking for a detailed blog on hiring AngularJs developers, then do check out https://www.toptal.com/angular-js#hiring-guide.You will love it!

Similar Blogs:




Top 10 AngularJs Interview Questions


AngularJs Vs Angular


Forms in AngularJs


Templates And Expressions in AngularJs


Journey of Angular


Controllers in AngularJs


Services in AngularJs

$scopes in AngularJs

Dependency Injection in AngularJs!



Tagged : / /

Leave a Reply