9. What Is a Data Binding?
1. The automated way to link template and viewModel values between each other.
2. The automated way to link two and more viewModels between each other.
9
10. Template to Component Binding
View is updated
User changed
view
View triggers
event with
changes
viewModel
subscribed to the
events gets values
viewModel
modifies view in
some way
10
11. Template to Component Binding
View is updated
User changed
view
View triggers
event with
changes
viewModel
subscribed to the
events gets values
viewModel
modifies view in
some way
11
Almost all frameworks are
tracking changes and
doesn’t refresh HTML if
there’s no changes.
13. Component to Template Binding
Angular saves copy
of all values
Variable changes
Angular compares
new and old values
If there are
differences – it
updates the view.
Otherwise skips it
13