首页 > 解决方案 > 如何列出firestore中的所有集合

问题描述

我想以角度 11 获取我的文档中的所有子集合。方法 listCollections() 不起作用。

const snapshot = await this.firestore.collection("companies").doc(this.id).listCollections().valueChanges();
    snapshot.subscribe(val=> this.data.push(val))
    console.log(this.data);

标签: javascriptangulargoogle-cloud-firestoregoogle-cloud-functionsangularfire2

解决方案


推荐阅读