Rxjs - Operators - MergeMap Posted on 2016-05-18 | In RxJS Signatureexport declare function mergeMap<T, I, R>( project: (value: T, index: number) => ObservableInput<I>, resultSelector?: ( ... Read more »
Rxjs - Operators - ConcatAll Posted on 2016-05-18 Signatureexport declare function concatAll<T>(): T; 高阶流版本的concat Examplevar clicks = Rx.Observable.fromEvent(document, 'click');var higherOrder ... Read more »
Rxjs - Operators - MergeAll Posted on 2016-05-18 | In RxJS Signatureexport declare function mergeAll<T>(concurrent?: number): T; Parameters接受一个可选参数 - 并存流的数量 Samplevar clicks = Rx.Observable.fromEvent(doc ... Read more »
Rxjs - Operators - CombineAll Posted on 2016-05-17 | In RxJS Signatureexport declare function combineAll<R>(project?: (...values: Array<any>) => R): Observable<R>; Examplevar clicks = Rx.Obs ... Read more »
Rxjs - Operators - CombineLatest Posted on 2016-05-17 | In RxJS Signatureexport declare function combineLatest<T, R>( ...observables: Array<ObservableInput<any> | Array<ObservableInput<a ... Read more »
Angular2 - ComponentResolver Posted on 2016-05-17 | In Angular2 Ng2 RC了变化很多.这个是群友Twitter上找到的一个动态加载的例子. 不同于动态加载本地的组件,这个牛逼在加载远程的 import {Component, ViewChild, ViewContainerRef, ComponentResolver} from '@ang ... Read more »
Rxjs - Operators - SwitchMap Posted on 2016-05-17 | In RxJS 如果switch不够用,就看看这个switchMap吧 Signatureexport declare function switchMap<T, I, R>( project: (value: T, index: number) => ObservableInput< ... Read more »
Rxjs - Operators - Switch Posted on 2016-05-17 | In RxJS 前身这个就是以前的flatMapLatest补充一下 – 使用switch的前提是本身的流里每个元素都已经变成了流,而且这家伙没参数,不能更具体的控制 包含每一个元素就是一个流 switch的特点就是当一个内部元素(流)发出后,下一次元素(流)发出时,前面的内部元素就被取消订阅 想象下:根据客户服务 ... Read more »
Rxjs - Operators - FindIndex Posted on 2016-05-17 | In RxJS Signatureexport declare function findIndex<T>( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: ... Read more »
Rxjs - Operators - TakeLast Posted on 2016-05-17 | In RxJS Signatureexport declare function takeLast<T>(total: number): Observable<T>; 取出一个流中最后几个数据组成一个新的流 注意前提: 流要结束才会出数据 var many = Rx.Observable.r ... Read more »