data binding angularjs

The data binding is the data synchronization processes that work between the model and view components.

In the Angular, model treat as source of application and view is the projection of the angular model.
In that scenario, when the model data changed that time the view data is automatically changed and vice versa.

Two Types of data binding

1.       One-Way data binding
2.       Two-Way data binding

In the One-Way data binding, View (UI part) not updates automatically when data model changed. It’s not a synchronization processes and its one way look like below image.



In the Two-Way data binding, View (UI part) updates automatically when data model changed. Its synchronization processes. Its way looks like below image.



How does data binding work in the AngularJs?

In AngularJs, remember the values and its compare to the previous value. If any changes in the previous value that time fired a change event automatically.

The HTML tells the AngularJs compiler to create the $watch for controller methods and its run inside the $apply method.



About Blogger

ANIL SINGH

Hey! I am Anil Singh. I am Active Blogger, Writer and Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
http://www.code-sample.com
http://www.code-sample.xyz

    Blogger Comment
    Facebook Comment

1 comments:

SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book