I'm using $q.all as below to test my simple code. Some how $q is taking very long time to process the second one in the promise array and my backend server is timing out. When I see Network tab in the browser, getAccountStatementList is giving me 200 status where as getInvoiceDetails shows pending for ever before server timeout. How do I resolve this?
var promises = [$http.get('getAccountStatementList'), $http.get('getInvoiceDetails')];
$q.all(promises).then(function(values){
console.log("Values 0 "+values[0]); // value alpha
console.log("Values 1 "+values[1]); // value beta
complete();
});