Answer the question
In order to leave comments, you need to log in
How to send multiple api requests in a loop in angular?
I want to make several api requests through a loop. But outputs only 1 request correctly. There are more of them. Please tell me how to solve this problem
for(let i = 0; i < Object.keys(response).length ; i++){
return this.facebookService.getDataOfAds(response[i][2])
.toPromise().then(response => {
this.data = this.ls.addItem(response,this.varGroup);
})
.catch((err:any) => {
console.log(err);
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question