You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 11, 2021. It is now read-only.
In most cases, a view is bound to model and binds to the model or collections event's (using Marionette primarily). However in certain case views need to wait to load until two or more data are available. This is where promises are most useful.
A promise is created fetch some async operation is being executed (loading data from server). Once the response comes back the promise is either resolved or rejected which will executed all currently bound handlers, but will also immediately execute future handlers.
All calls to models or collections that invoke an Ajax call returns a promise, however they are not being used anywhere nor persisted until the next call is made. This prevents the ability to bind to the promise after the response has returned and results in needed to check if collection.length > 0 (which does not inform as to whether the ajax call has finished..).
The text was updated successfully, but these errors were encountered:
In most cases, a view is bound to model and binds to the model or collections event's (using Marionette primarily). However in certain case views need to wait to load until two or more data are available. This is where promises are most useful.
A promise is created fetch some async operation is being executed (loading data from server). Once the response comes back the promise is either resolved or rejected which will executed all currently bound handlers, but will also immediately execute future handlers.
All calls to models or collections that invoke an Ajax call returns a promise, however they are not being used anywhere nor persisted until the next call is made. This prevents the ability to bind to the promise after the response has returned and results in needed to check if
collection.length > 0
(which does not inform as to whether the ajax call has finished..).The text was updated successfully, but these errors were encountered: