Javascript 承诺。所有()和地图,沉默

Javascript 承诺。所有()和地图,沉默,javascript,typescript,es6-promise,Javascript,Typescript,Es6 Promise,事实上,我面临着一个承诺的问题,一个误解 我有一个带有ID列表的数组,我用它来进行API调用,我确信它是有效的和有效的。所以我必须使这个列表中的foreach元素成为一个API调用=>Promise 我读过关于承诺的书,我找到了一个干净的方法来实现它: clean(){ /** Here, I'm just cleaning invalid ids to avoid a silenced map. I tried the whole output in the API explorator,

事实上,我面临着一个承诺的问题,一个误解

我有一个带有ID列表的数组,我用它来进行API调用,我确信它是有效的和有效的。所以我必须使这个列表中的foreach元素成为一个API调用=>Promise

我读过关于承诺的书,我找到了一个干净的方法来实现它:

clean(){
/** Here, I'm just cleaning invalid ids to avoid a silenced map. I tried the 
whole output in the API explorator, and it works well*/
this.facebook.objectIdsToDelete.forEach(element => {
  let index = this.facebook.objectIdsToFilter.indexOf(element);
  this.facebook.objectIdsToFilter.splice(index, 1);
});

Promise.all(this.facebook.objectIdsToFilter.map(value=>{
  return this.facebook.callApiLikes(value);
}))
.then((responses) => {
  this.debogger.debogSomething(responses);
})
.catch((reason) => {
  this.debogger.debogSomething(reason);
})
}
debogger=>这是一个显示对象内容的弹出窗口。 this.facebook.objecIdsToFilter=>是一个字符串[]

此弹出窗口不会弹出,不会发生任何事情。
我哪里做错了

this.facebook.callapikes(value)
是否真的返回了一个承诺?“我做错了什么”-答案是你没有使用debugger@RalphKing,是的,它回来了promise@DanielKhoroshko我正在开发离子3。。。由于我使用的是cordova和本地组件,debogger不再适用于我。为了解决这个问题,我搜索了很多,但没有找到任何解决方案:(