Top "Rxjs" questions

The Reactive Extensions for JavaScript (RxJS) is a set of libraries for composing asynchronous and event-based programs using observable collections and Array Extras style composition.

Observable type error: cannot read property of undefined

In my Angular 2 application, I get an error: Cannot read property 'title' of undefined. This is a very simple component, …

angular observable rxjs
Create one-time subscription

I need to create a subscription to an Observable that is immediately disposed of when it is first called. Is …

rxjs
TypeScript - wait for an observable/promise to finish, and return observable

I am quite new to TypeScript & RxJS, and I am trying to return an Observable after another Observable is …

typescript rxjs observable
How to throw an observable error manually?

I am working on an Angular app in which I am making a rest call through HTTP as below: login(…

javascript angular typescript rxjs
RxJS: How would I "manually" update an Observable?

I think I must be misunderstanding something fundamental, because in my mind this should be the most basic case for …

reactive-programming rxjs
How to cancel a subscription in Angular2

How does one cancel a subscription in Angular2? RxJS seems to have a dispose method, but I can't figure out …

javascript angular rxjs
How to throw error from RxJS map operator (angular)

I want to throw an error from my observable's map operator based on a condition. For instance if correct API …

angular typescript rxjs
Angular 4+ ngOnDestroy() in service - destroy observable

In an angular application we have ngOnDestroy() lifecycle hook for a component / directive and we use this hook to unsubscribe …

angular rxjs observable angular-services
Property 'subscribe' does not exist on type '() => Observable<any>'

service file import { Observable } from 'rxjs/Rx'; import { Http,Response} from '@angular/http'; import { Injectable } from '@angular/core'; …

angular typescript rxjs observable angular2-services
why should we use subscribe() over map() in Angular?

I am trying to take advantage of observables in angular2 and got confused on why should i use map() over …

angular typescript rxjs observable angular-observable