I am working in a MVC application , I have booking list screen and a search popup window while clicking on search button a popup view will show and user will enter the filter parameters and submit the popup . I need to transfer the parameter as a JSON array to the booking list view , How we can transfer that values form one view to other
Share
Use a single collection that is referenced by both views. This is how you store and represent state in backbone. View’s don’t transfer state directly to one another. Views manipulate models and collections, which fire events, which cause other views to react. So if you have a view that sets up filter parameters, once those are entered, they should be set in to a collection, which will store them and use them during
fetch(). When new models are loaded, other views can be notified to rerender.