本文整理匯總了TypeScript中rxjs/operator/mergeMap.mergeMap類的典型用法代碼示例。如果您正苦於以下問題:TypeScript mergeMap類的具體用法?TypeScript mergeMap怎麽用?TypeScript mergeMap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了mergeMap類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
return this.preloadingStrategy.preload(route, () => {
const loaded$ = this.loader.load(ngModule.injector, route);
return mergeMap.call(loaded$, (config: LoadedRouterConfig) => {
route._loadedConfig = config;
return this.processRoutes(config.module, config.routes);
});
});
示例2: loadModuleFactory
private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {
if (typeof loadChildren === 'string') {
return fromPromise(this.loader.load(loadChildren));
} else {
return mergeMap.call(wrapIntoObservable(loadChildren()), (t: any) => {
if (t instanceof NgModuleFactory) {
return of (t);
} else {
return fromPromise(this.compiler.compileModuleAsync(t));
}
});
}
}
示例3: toActions
/**
* @private
*/
toActions(): Observable<Action> {
return mergeMap.call(
groupBy.call(this, getSourceForInstance),
(source$: GroupedObservable<any, any>) =>
dematerialize.call(
map.call(
exhaustMap.call(source$, resolveEffectSource),
(output: EffectNotification) => {
verifyOutput(output, this.errorReporter);
return output.notification;
}
)
)
);
}