我在服务中使用 AngularFire2 从 Firestore 集合中获取数据。代码看起来像这样:
this.db.collection('organizations')
.valueChanges()
.pipe(first())
.toPromise()
.next(organization => console.log(organization));
控制台正在完全按照预期记录组织对象。但是该对象缺少 Firestore 文档的 ID。
所以我想知道是否可以做一些事情来获取 ID 作为该查询的一部分......