如何在Firestore上列出子集合? [英] How to list subcollection on firestore?
本文介绍了如何在Firestore上列出子集合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
collection/document/collection/document
user/teamname/username/info
我想列出teamname document
的收藏集.我需要收藏集名称.下面的函数返回undefined.
I want to list teamname document
's collections.I need collection names. Below functions return undefined.
firestore.collection('user')
.doc('teamname').onSnapshot((data) => { console.log(data) });
firestore.collection('user')
.doc('teamname').get().then((data) => { console.log(data) });
日志:
_data:undefined
_metadata: {}
_ref:{}
推荐答案
查看全文