小编Lui*_*ruz的帖子

combineLatest 不适用于承诺

我想执行一些顺序代码,但我无法从 combineLatest 中提取数据

const { datosPersona, participante } = await combineLatest(
  this.store.select('datosPersona'),
  this.store.select('participante')
).pipe(
  map((data) => ({ datosPersona: data[0], participante: data[1] }),
).toPromise();
Run Code Online (Sandbox Code Playgroud)

promise async-await rxjs angular

2
推荐指数
1
解决办法
393
查看次数

标签 统计

angular ×1

async-await ×1

promise ×1

rxjs ×1