如何解决Firestore statechanges() Angular 在没有数据时不返回任何内容
我正在使用 where() 查询 Firestore 集合。应用过滤器后,集合中没有数据匹配。在这种情况下,firestore 不会返回任何东西。我有一个加载图标,如果过滤时没有返回数据,我需要禁用它。
我正在使用 ngrx statechanges 来查询数据
ofType(quoteActions.queryQuotes),withLatestFrom(this.salesFacade.getFilter$),switchMap(([action,filter]) => {
let response = this.dfs.collection<IQuotesDataModel>('quotes',(ref) => { return
ref2.orderBy('createdDate','desc').limit(50);
}).stateChanges()
return response;
}),mergeMap(actions => actions),```
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。