Top "Observable" questions

An observable is typically a programming construct that can be "watched" by other parts of the code, called the "observers". Different frameworks and programming languages have different implementations for observables, so this tag should typically be used in conjunction with others.

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
RxJs get value from observable

In component : singleEvent$: Observable<Event>; On init, I get observable this.singleEvent$ = this._eventService.events$ .map(function (events) { …

typescript angular rxjs observable
Unit testing an observable in Angular 2

What is the correct way of unit testing a service returning an Observable result in Angular 2? Let's say we have …

unit-testing jasmine angular observable
Get route query params

I am trying to migrate from rc1 to rc4 and i have trouble getting query string parameters. ActivatedRoute object always …

typescript angular observable angular2-routing
angular2 wait until observable finishes in if condition

I have implemented a if statement like this if (this.service.check() ) { return true; } else { } this if condition waits for …

angular observable
Simple filter on array of RXJS Observable

I am starting my project with Angular2 and the developers seem to recommend RXJS Observable instead of Promises. I have …

javascript typescript angular rxjs observable
Observable.forkJoin and array argument

In the Observables forkJoin documentation, it says that args can be an array but it doesn't list an example doing …

angular observable fork-join
Knockout Filtering on Observable Array

I've started learning Knockout and I'm having some trouble filtering an observable array on a button click and displaying the …

javascript knockout.js filter observable