Top "Rxjs5" questions

The 5th version of the reactive extensions for javascript.

Angular2: Unsubscribe from http observable in Service

What is the best practice to unsubscribe within a Angular2 service from a http subscription? Currently I do this but …

angular rxjs5 unsubscribe
rxjs 5 publishReplay refCount

I can't figure out how publishReplay().refCount() works. For example (https://jsfiddle.net/7o3a45L1/): var source = Rx.Observable.…

rxjs rxjs5
How to subscribe to event emitter once?

// Part of service public someEvent: EventEmitter<number> = new EventEmitter(); .... // Component @Component({ selector: 'some-component', template: `...` }) export class SomeComponent { constructor(…

angular rxjs eventemitter angular2-services rxjs5
Angular 2 - Sort list from Observable

What is the best way to sort a list of items coming from an Observable and still be able to …

angular rxjs5
RxJs and Typescript. TS2307: Cannot find module '@reactivex/rxjs'

I got a problem with typescript and RxJs v5. Please Look the UPDATE sections. I did yarn add @reactivex/rxjs (…

typescript rxjs rxjs5
How to stop an interval on an Observable in RxJS

I have a specific situation where I'm using an RxJS interval, but at any given moment I may need to …

javascript rxjs observable rxjs5
Rxjs Subject next() after complete()

I have service which connects with Subject() to do paging. I'm using next(newData) to pass to subject, which keeps …

javascript rxjs observable observer-pattern rxjs5
How does the RxJs 5 share() operator work?

Its not 100% clear for me how the RxJs 5 share() operator works, see here the latest docs. Jsbin for the question …

javascript rxjs rxjs5
RxJS Map array to observable and back to plain object in array

I have an array of objects from which I need to pass each object separately into async method (process behind …

rxjs observable rxjs5 angular2-observables fork-join
How to only execute an Observable if term is not null/empty?

I have the following code inside my constructor: this.searchResults = this.searchTerm.valueChanges .debounceTime(500) .distinctUntilChanged() .switchMap(term => this.apiService.…

angular typescript rxjs observable rxjs5