I have a route class and in the template, I use a custom grid component
{{my-grid params=this.gridParams elementId='myGrid'}}
Now, there are 2 AJAX calls to be made to populate the grid;
1. /getColumns (this column header data response is used to set some properties on my controller)
2. /getData (this body response is actually used to populate the grid with actual data and is actually computed to gridParams)
I was reading the guide on "The Router Pauses for Promises" https://guides.emberjs.com/v2.2.0/routing/asynchronous-routing/
However, this is for a single promise/ajax call.
How can I make it work in my case ?
UPDATE
My common single POST request
doPostReq: function(postData, requestUrl){
var promise = new Ember.RSVP.Promise(function(resolve, reject) {
return $.ajax({
}).success(resolve).error(reject);
})
return promise;
},