As I understand from your question, you have a page where one section depends on other section and so on. and all these sections are being served/rendered by different-2 http request.
In this case, you can make the second http request from the success/resolved callback of first http request and so on. e.g.
servicePOST.send(appConstants.BASE_MS_URL + 'Dcrs/activityDay.php',{
"date":d
}).then(function(result) {
$scope.dcrlocked = result.dcrlocked;
$scope.leaves = result.leaves;
//$scope.holidays = result.holidays;
//make another http request as below.
servicePOST2.send(url,{data or data from last request}).then(function(){
// make another http request. and so on.
})
});
As all the http requests are being made from the success callback of last http request, it will guarantee sequential http requests.
EDIT
you can make use of $promise
in your second function, where you are calling post request. e.g.
var deferred = $q.defer();
servicePOST.send(appConstants.BASE_MS_URL + 'Dcrs/activityDay.php',{
"date":d
}).then(function(result) {
$scope.dcrlocked = result.dcrlocked;
$scope.leaves = result.leaves;
//$scope.holidays = result.holidays;
deferred.resolve(result);
});
return deferred; // return deferred from your function.
Don't forget to inject $q in you controller and then passing it to second function. This will make post function to return synchronously. Let me know if this what you are looking for.