使用firebase,您可以像这样获取集合中的文档:使用collectionData的const collectionData = await collectionPath.get();,您可以使用以下命令循环: collectionData.forEach(doc=>{ // doc here is a document, and we can get data with doc.data()}); 上面的代码使collectionData的行为类似于一个<
// import all functions needed from the SDKS needed storageBucket: FIREBASE_STORAGEBUCKET,
messagingSenderId: FIREBASE_MESSAGINGSENDERIDdb.collection('
我有一个集合名称项,其中文档以uid命名,其中还有另一个集合帖子,它具有自动生成的文档和数据。我试图查询和获取所有的收集内的帖子。<pre>
function show_items(){ firebase.auth().onAuthStateChangedconsole.log(u_id); return;