Two-way data binding
We already mentioned it a number of times as one of the most convenient and widely-known features of Angular, as well as in many other reactive frameworks out there. Nonetheless, before going further, let’s ensure that we know what we’re talking about.
Two-way data binding, also known as two-way binding, means that whenever the Data Model changes, the UI changes accordingly and vice versa. To be more specific, consider the following:
- Whenever the model is updated, the changes are immediately reflected to the views implementing it
- Whenever a view is updated, the changes are immediately reflected in the underlying model
From a practical development perspective, two-way data binding will help us a lot, because we won’t have to manually sync the UI components with the Data Model.
The good news is, since we’re using Angular, we’re already set; our application is already equipped with fully-functional two-way data binding between two Angular components that share a data bind via...