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.
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.
Blogger Comment
Facebook Comment