Within my angular application, I am currently dealing with 6 to 7 http chaining requests that are taking a significant amount of time to execute. What are some strategies for optimizing this process?
empSvc.getallEmp().then(function (data) {
if (data !== null && data.length > 0) {
repos.saveEmp(data).then(function () {
repos.getemp().then(function (result) {
ctrl.emp= result;
getsubordinates().then(function () {
deleteinactive(data).then(function () {
deleteinactiveSubordinate(ctrl.emp).then(function () {
console.log(success);
});
});
});
});
});