In Angular 2.0.0-alpha.47 the Observable
returned from calling formInput.valueChanges()
had all the higher order functions i.e I could do something like this;
this.search.valueChanges
.debounceTime(150)
.map(x=>return x+1)
.switchMap(text => this.youtube.search(text));
I'm now using 2.0.0-beta.0 and the Observable
returned from this.search.valueChanges()
no longer has all the methods. I can only subscribe. I can no longer call map(), filter() etc.
Does anyone know if this is the expected behaviour for form inputs now?
import Rxjs like this :
The operators will be available.
When you use Observable class .. prefix it with Rx. ( Rx.Observable )
Did you try to import this:
See this issue for more details https://github.com/angular/angular/issues/5632
Hope it helps you, Thierry