Questions tagged [rxjs-dom]

RxJS-DOM provides Reactive Extensions for JavaScript (RxJS) bindings for HTML DOM objects to abstract over the event binding, Ajax requests, Web Sockets, Web Workers, Server-Sent Events, Geolocation and more.

RxJS-DOM (https://github.com/Reactive-Extensions/RxJS-DOM) provides Reactive Extensions for JavaScript (RxJS) bindings for HTML DOM objects to abstract over the event binding, Ajax requests, Web Sockets, Web Workers, Server-Sent Events, Geolocation and more.

24 questions
23
votes
4 answers

Rxjs, fromEvent to handle multiple events

What is the best way to handle multiple events on the same DOM node in rxjs 5.1? fromEvent($element, 'event_name') but I can specify only one event at a time. I want handle scroll wheel touchmove touchend events.
Reddy
  • 1,403
  • 3
  • 14
  • 27
10
votes
5 answers

Work around for more than 6 forkJoin parameters?

I have a need/desire to use more than six parameters in a forkJoin. Currently, based on the answer to another related question it doesn't appear possible to send more than 6 parameters to forkJoin. However, based on the offical documentation, it…
Simm28
  • 103
  • 1
  • 6
6
votes
2 answers

How to use RxJS to display a "user is typing" indicator?

I know a little bit of BaconJS, but now I'm trying to learn RxJS by creating a "User is typing..." indicator. It's pretty simple, it can be explained in two simple rules: When the user is typing, the indicator should be immediately visible. When…
adrianmcli
  • 1,956
  • 3
  • 21
  • 49
3
votes
1 answer

How to test RxJS events

I'm handling a mouseover event using Observable.fromEvent(), with various chained operators. How would I go about unit testing this? export const bindMouseover = (link) => Observable.fromEvent(link, 'mouseover') .filter(event =>…
babbaggeii
  • 7,577
  • 20
  • 64
  • 118
2
votes
1 answer

RxJs webSocket not able to connect to a websocket server implemented with socket.io

I have a simple websocket server built following this example import { createServer, Server } from 'http'; import * as express from 'express'; import * as socketIo from 'socket.io'; export class MobileObjectServer { public static readonly…
Picci
  • 16,775
  • 13
  • 70
  • 113
2
votes
1 answer

Part of the DOM continuously getting refreshed in Angular 5. While trying to fetch videos from YouTube API

Calling Youtube API in ngOnInit(){ var finalURL = "https://www.googleapis.com/youtube/v3/search?key="+this.api+"&channelId="+this.chanId+"&part=snippet,id&order=date&maxResults="+this.result+"" console.log(finalURL); this.obser$ =…
2
votes
2 answers

RxJs How to set default request headers?

Not sure is there any way to set default request headers in rxjs like we do with axios js as- axios.defaults.headers.common['Authorization'] = 'c7b9392955ce63b38cf0901b7e523efbf7613001526117c79376122b7be2a9519d49c5ff5de1e217db93beae2f2033e9'; Here…
Mohan Dere
  • 4,497
  • 1
  • 25
  • 21
2
votes
1 answer

Can I used RxJS-DOM over RxJS with Redux-Observable

Redux-Observable has a dependency on RxJS. I need to use the filereader function from RxJS-DOM. https://github.com/Reactive-Extensions/RxJS-DOM/blob/master/doc/operators/filereader.md It looks like RxJS-DOM contains the same basic set of APIs as…
2
votes
1 answer

rxjs-dom how to pass data into POST

I'm using rx.DOM.ajax https://github.com/Reactive-Extensions/RxJS-DOM/blob/master/doc/operators/ajax.md I'm trying to get some data from a url using POST but it doesn't return anything. Here's the code: Rx.DOM.ajax({ url: 'src/php/search.php', …
A. L
  • 11,695
  • 23
  • 85
  • 163
1
vote
1 answer

How to control pressure of multiple ajax calls with RxJS

Using RxJS 5 i want to solve the following: Lets say that Im fetching a list of categories of sorts from a REST API. Based on each and one of those categories, I want to fetch sub categories from another REST endpoint. Then, based on each and one…
Spetastium
  • 205
  • 3
  • 12
1
vote
1 answer

RxJS: Transfer values in stream

I want to create an observable which 1. Gets token with getToken2 method 2. Use this token to get userdata with flatMap 3. Assign just received userData and token( which was received via flatMap) to localStorage The problem is that I am unable…
1
vote
0 answers

RxJS - ajax.delete keeps retrying until the observable fails while DELETE request was 200 OK

I'm facing some issues with ajax.delete. I'm running the code below where a DELETE request from ajax is being done and if the first fails, it keeps retrying until the request is successful. let RetryStrategy = attempts => attempts …
stelioschar
  • 115
  • 1
  • 2
  • 10
1
vote
1 answer

Rxjs-DOM load function does not fire angular 2

I am currently working on a Angular 2 project where I need to call specific functions only and only after ALL the elements on the page are loaded. I tried to use eventFrom function from Observable, it worked when I was expecting a 'click' operation,…
CannotCode
  • 125
  • 1
  • 2
  • 10
1
vote
1 answer

ReactJS Redux RxJS AJAX loading indicator

I have a ReactJS & Redux application, and using RxJS for async AJAX with cancellation and error handling. The middleware (for Redux) I am using to connect Redux and RxJS is redux-observable. I am having a request to the server which also handles…
shabenda
  • 1,759
  • 3
  • 14
  • 23
1
vote
1 answer

RxDom: not working when new id created

I'm using Reactive Extension DOM for listening event from DOM. Here is my sample code: var input = document.getElementById('test_id'); var source = Rx.DOM.change(input); var subscription = source.subscribe( function (x) { …
Trần Kim Dự
  • 5,872
  • 12
  • 55
  • 107
1
2