【发布时间】:2019-06-14 09:44:30
【问题描述】:
我正在使用 anguarfire2,我只需要从 Firestore 中获取来自特定类型客户的值并按职位排序
我已经尝试了以下但没有给我任何结果
angularFirestore.collection('customers', ref => ref.where('type', '==', type)
.orderBy('position')
.startAt(1)
.endAt(2))
但是
angularFirestore.collection('customers', ref => ref.orderBy('position')
.startAt(1)
.endAt(2) )
它有效。无论客户类型如何,它都能为我提供结果。
是否可以通过 where、orderBy、startAt 和 endAt 的组合来获取值?
【问题讨论】:
-
您需要将多个 where 与要过滤的每个子句链接起来
标签: javascript google-cloud-firestore angularfire2