简体   繁体   English

如何使用 AngularFire 查询实时数据库?

[英]How to query realtime database with AngularFire?

how to check a specific data in realtime database as well as it checks in firestore ?如何检查实时数据库中的特定数据以及它在 firestore 中的检查?

this.afs.collection('collection', ref => ref.where('data', "==", date
    )).snapshotChanges(.subscribe(res => {

I've try我试过了

this.database.list('collection', ref => ref.where

but, "Property 'where' does not exist on type 'Reference'."但是,“属性 'where' 在类型 'Reference' 上不存在。”

我建议查看有关在实时数据库中查询列表的 AngularFire 文档,以及有关在 JavaScript 中排序和过滤实时数据库数据的 Firebase 文档,这些文档表明查询是通过以下方式完成的:

this.database.list('collection', ref => ref.orderByChild("data").equalTo(date))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Angular 应用程序中使用 AngularFire 从 Firebase 实时数据库中查询和显示经过身份验证的用户的订单? - How do you query and display the authenticated user's order from the Firebase Realtime Database using AngularFire in an Angular app? AngularFire2 RealTime数据库按日期值排序 - AngularFire2 RealTime DataBase sort by date value 如何在一定范围内查询实时数据库 - How to query Realtime Database between a certain range 如何从Firebase实时数据库查询? - How to query from firebase realtime database? 如何使用 Firebase 实时数据库查询所有孩子 - How to query all children with Firebase Realtime Database 如何正确查询实时数据库以实现云功能? - How to query realtime database properly for cloud fucntion? Ionic AngularFire实时数据库-更改推送条目的默认UID - Ionic AngularFire Realtime Database - Change Default UID of pushed entry Firebase 实时数据库规则限制用户 id 在模拟器中运行但不在 AngularFire 中 - Firebase RealTime database rules to restrict on user id runs in simulator but not in AngularFire 如何查询关键Angularfire2 - how to query key Angularfire2 如何从特定的实时数据库路径查询值? - How to query value from specific Realtime Database path?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM