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 :
Import * as Rx from "rxjs/Rx";
The operators will be available.
When you use Observable class .. prefix it with Rx. ( Rx.Observable )
Did you try to import this:
import 'rxjs/add/operator/map';
See this issue for more details https://github.com/angular/angular/issues/5632
Hope it helps you, Thierry
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With