Jquery Promise and Defered with returned results
问题 I am using Backbone.js and I have a number of events, that produce settings for the Options object, that occur in my router. The view that gets called needs these objects and so, they must complete before the view is created. The problem is that these events that occur are ajax and are asynchronous, so they don't complete before the view is displayed. I tried making the events synchronous, but that causes other issued, like freezing the gui. So, I'm trying to chain my functions so that the