Can two different services be called in a specific order?
I am working with two services, here are the details:
dataservice.getCPUUtilization(model.dbName).then(function (data) {
model.cpuUtilizationChart = data;
model.cpuPercentage = model.cpuUtilizationChart[0].combined;
console.log ("******** CPU Utilization Chart components are ******* :" + model.cpuUtilizationChart);
console.log ("******** CPU Percentage is ******* :" + model.cpuPercentage);
});
dataservice.setCPUPercentage(model.setcpuPercentage);
After calling the getCPUUtilization
service I need to call:
However, it seems like the setCPUPercentage
service is being called before getCPUUtilization
. What can I do about this?