I’m using the method described in this Stackoverflow answer to execute API calls in a sequential order.
var root_promise = current_promise = Ember.Deferred.create();
current_promise = current_promise.then(function(){
return // ...something that returns a promise...;
});
current_promise = current_promise.then(function(){
return // ...something that returns a promise...;
});
// etc.
root_promise.resolve();
Ember.Deferred is deprecated in Ember 1.7.0. How can I write equivalent code now? I did some research, but couldn’t find the answer. Also, because I couldn’t find the RSVP API documentation on the Ember.js website anymore.