I want to use DOM in angular project like this
Rx.DOM.jsonpRequest
but DOM is not available on Rx which Im importing like this
import Rx = require('rxjs');
I also tried to import rxjs dom but error was can not find module, I installed rxjs-dom like this
npm install rx-lite-dom
but Im unable to import it so that I can DOM on Rx object
Rx.DOM
for doing things likeRx.DOM.focus('#myInput')
. Binding to dom events basically. But this is not the way. The way to do this in angular 2.0 is usingObservable.formEvent('#myInput' 'focus')
. I lost half a day trying to installrx-dom
when was this better solution. As for jsonpRequest you can use this library. then do:Observable.formPromise(your_jsonp_promise)
which should work becausefetchJsonp
returns a promise. Good luck! – Prindle