我很难尝试将groupBy用于angularfire2(目前为5.0.0-rc.3)
我有以下功能:
get(): Observable<any> {
return this.af
.list(this.path, ref => ref.limitToLast(100))
.valueChanges()
.map(list => {
return list.map( (item:any) => {
//Do some stuff
return item;
})
//Chaining groupBy here won't work
;
})
//Chaining groupBy here does nothing (subscribe will not fire)
.subscribe(data => {
//Do other stuff
});
}
我需要将此列表分组到某个属性上,我无法按照RXJS doc
进行操作https://www.learnrxjs.io/operators/transformation/groupby.html
感谢任何帮助。