本文整理匯總了TypeScript中angularfire2/angularfire2.FirebaseObjectObservable.flatMap方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript FirebaseObjectObservable.flatMap方法的具體用法?TypeScript FirebaseObjectObservable.flatMap怎麽用?TypeScript FirebaseObjectObservable.flatMap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angularfire2/angularfire2.FirebaseObjectObservable
的用法示例。
在下文中一共展示了FirebaseObjectObservable.flatMap方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getMatchesToBetAndToPlay
getMatchesToBetAndToPlay():Observable<Array<Match>> {
return this.matches$.flatMap((matches:Array<Match>) => {
let matchesToPlay = matches.filter(match => match.status == Status.TO_PLAY);
return this.filterMatchesByDayIdAvailable(matchesToPlay);
});
}
示例2: getMatchesOfGroupPhase
getMatchesOfGroupPhase():Observable<Array<Match>> {
return this.matches$.flatMap((matches:Array<Match>) => {
return Observable.of(this.filterMatchesByDayId(matches, PHASE_GROUP_MAX_DAY_ID))
.flatMap((matches:Array<Match>) => {
return this.associateWithUserBet(matches);
});
});
}
示例3: getGroups
getGroups():Observable<Array<GroupTable>> {
console.log('groups @ get groups');
this.loadingState.start();
return this.groups$.flatMap((groups:Array<Group>) => {
console.log('groups @ group matches by phase code');
return this.associateGroupWithMatches(groups);
})
.do(() => this.loadingState.stop());
}
示例4: getMatchesToBet
private getMatchesToBet():Observable<Array<Match>> {
return this.matches$.flatMap((matches:Array<Match>) => {
return this.filterMatchesByDayIdAvailable(matches);
});
}