AB
Size: a a a
AB
OS
AB
AB
BK
for(let i = 0; i < Object.keys(dbData).length; i++){
this.facebookService.getDataOfAds(dbData[i].token)
.toPromise()
.then(response => {
})
.catch((err:any) => {
console.log(err);
});
}
OS
for(let i = 0; i < Object.keys(dbData).length; i++){
this.facebookService.getDataOfAds(dbData[i].token)
.toPromise()
.then(response => {
})
.catch((err:any) => {
console.log(err);
});
}
ЭП
for(let i = 0; i < Object.keys(dbData).length; i++){
this.facebookService.getDataOfAds(dbData[i].token)
.toPromise()
.then(response => {
})
.catch((err:any) => {
console.log(err);
});
}
S
for(let i = 0; i < Object.keys(dbData).length; i++){
this.facebookService.getDataOfAds(dbData[i].token)
.toPromise()
.then(response => {
})
.catch((err:any) => {
console.log(err);
});
}
forkJoin(Object.keys(dbData).map(key => this.getData(key)))
OS
forkJoin(Object.keys(dbData).map(key => this.getData(key)))
forkJoin(Object.keys(dbData).map(key => this.getData(dbData[key])))
BK
S
OS
BK
OS
BK
BK
OS
forkJoin(Object.keys(dbData)не уверен что скобки правильно выставил, но примерно так
.map(key => this
.getData(dbData[key])
.pipe(
catchError(error => of('something goes wrong'))
)
)
BK
forkJoin(Object.keys(dbData)не уверен что скобки правильно выставил, но примерно так
.map(key => this
.getData(dbData[key])
.pipe(
catchError(error => of('something goes wrong'))
)
)
forkJoin(Object.keys(dbData)
.map((key) => {
this.facebookService.getDataOfAds(dbData[key].token)
.pipe(catchError(error => of('something goes wrong')))
})).subscribe(
returnesponse => {
console.log('success',returnesponse);
},
error => {
console.log('error',error);
});
OS
BK
let url = "https://graph.facebook.com/v6.0/me/adaccounts";
return this._http.get(url+token);