【发布时间】:2018-09-17 21:09:34
【问题描述】:
我有两个功能:
async test1() {
const items = await this.afs.collection(`items`).valueChanges().pipe(take(1)).toPromise());
console.log(items.length);
}
async test2() {
const items = await this.afs.collection(`accounts/trgdfedrtrtr4J/items`).valueChanges().pipe(take(1)).toPromise());
console.log(items.length);
}
第一个给我 50 个结果,第二个给我 880 个结果,但他们都有 880 个项目!
有人知道是什么原因造成的吗?我没有其他代码,所以 Firestore 在我收到它们时并没有发送所有项目。我也试过ref.limit(1000),但没有任何作用。
【问题讨论】:
标签: google-cloud-firestore angularfire2