我想在获取时在firestore集合上运行“或”查询,并获取组合数组以进行迭代。从消防站未显示任何内容或显示为 * [] * []
我尝试通过对firestore集合字段的两个参数的where查询获取valuechange,然后使用'combineLatest'进行联接。
Firestore集合“ DATAS”:
{
parent_title: 'Hello',
title: 'Mello'
}
并想从Firestore中获取: 从'rxjs'导入{CombineLatest};
datas1 = this._afs.collection('DATAS', ref => ref.where('title','==',
'Hello')).valueChanges();
datas2 = this._afs.collection('DATAS', ref =>
ref.where('parent_title','==', 'Hello')).valueChanges();
data = combineLatest(datas1, data2);
在HTML中
<li *ngFor = 'let item of data | async'>
{{ item | json }}
</li>
我想加入OR查询的结果