Google cloud firestore 在检索集合的所有文档时,获取angularfire中另一文档的文档引用字段的数据

Google cloud firestore 在检索集合的所有文档时,获取angularfire中另一文档的文档引用字段的数据,google-cloud-firestore,angular8,angularfire,Google Cloud Firestore,Angular8,Angularfire,我想用machineRef和siteRef显示检索所有机器站点地图 getActiveMachineSiteMap() { return this.db.collection('machine-site-map', ref => ref.where('IsActive', '==', true)) .valueChanges({ idField: 'Id' }); } 通过这一点,我没有得到机器和站点根据有关的文档示例,方法db.collection只使用

我想用machineRef和siteRef显示检索所有机器站点地图

getActiveMachineSiteMap() {
    return this.db.collection('machine-site-map',
      ref => ref.where('IsActive', '==', true))
      .valueChanges({ idField: 'Id' });
}

通过这一点,我没有得到机器和站点

根据有关的文档示例,方法db.collection只使用一个参数。在这种情况下,你的函数应该是 这是文档存储模型。firestore的屏幕截图 我想用machineRef和siteRef显示检索所有机器站点地图

getActiveMachineSiteMap() {
    return this.db.collection('machine-site-map').where('IsActive', '==', true)
      .valueChanges({ idField: 'Id' });
}

还有一些关于github的文档,您可以查看,它可能会帮助您解决一些疑问。

Hi。。有解决办法吗?