In this recipe, we are going to learn how to bind a collection to a view. This can be very helpful if we have different views working with the same collection, or if we want to synchronize data with a REST server.
Let's take an example of the Rendering a model in a view recipe from Chapter 4, Views, where we rendered a collection with subviews and modified it. We are going to add an additional view with the Add and Remove buttons, which will update the collection.
Also, we will bind appropriate callbacks to the model and collection events in our first view, so it is re-rendered automatically when the collection is changed.
When a user clicks on the Add button, he/she is prompted to enter the required information to ...