I have about 5 requests that are made when my view loads. This is for an edit form:
var reqA = function() {...};
var reqB = function() {...};
var reqC = function() {...};
var reqD = function() {...};
var reqE = function() {...};
Now I want reqA()
and reqB()
to load asynchronously and if possible return a single promise.
reqC()
and reqD()
should only load after reqA()
and reqB()
have finished and executed their promise.
reqE()
should only load after reqC()
and reqD()
.
This is what I want to do, however I have no idea how to go about it. I can load them all asynchronously or one after another by chaining promises but not in the way I want.