What is the difference between one-way binding and two-way binding in AngularJS ?

Member

heather_fritsch

by heather_fritsch , in category: Technology , 2 months ago

What is the difference between one-way binding and two-way binding in AngularJS ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by aaliyah , 2 months ago

In One-Way data binding, view (UI part) not updates automatically when data model changed. We need to write custom code to make it updated every time.

ng-bind has one-way data binding.


While in two way binding scope variable will change it’s value every time its data model changed is assigned to a different value.