El *_*red 8 javascript firebase google-cloud-firestore
Google Firebase 似乎很难解决我的问题......从集合中获取文档及其数据没有问题,但是当我尝试简单地获取集合中所有 ID 的列表时,我无法弄清楚呼叫应该是什么样子。我曾尝试搜索信息,但没有成功。
我在服务组件中声明了一个函数,如下所示:
getCollRegistrationNumbers(): firebase.firestore.CollectionReference {
return firebase.firestore().collection(`storedItems`);
}
Run Code Online (Sandbox Code Playgroud)
然后在例如我的应用程序的搜索页面中,我从我的组件调用该函数,但无论我尝试什么,它都会返回空。
鉴于上面的服务功能,我应该如何完成下面的代码以仅 git 一个 ID 列表?
this.fireStore.getCollRegistrationNumbers().get()
.then(snapshot => {....})
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7833 次 |
最近记录: |