Angular2: How to import rx-dom

I want to use the DOM in an angular project like this

Rx.DOM.jsonpRequest 

but the DOM is not available in Rx, which Im imports, like this

 import Rx = require('rxjs'); 

I also tried to import rxjs dom, but the error could not find the module, I installed rxjs-dom, like this

 npm install rx-lite-dom 

but Im not able to import it so I can DOM to an Rx object

+7
angular reactive-programming rxjs rxjs5
source share
1 answer

If you want to access the Rx variable, you can import it into your Angular project using:

 import * as Rx from 'rx-dom'; 

You will then access the Rx variable, including jsonpRequest, as in:

 Rx.DOM.jsonpRequest 
0
source share

All Articles