rxjs5 Questions

4

Solved

I am reading the official documentation of RxJS and then I realized they both are doing exactly the same thing. To me they both seem exactly similar. Please point out the difference between them if...
Celle asked 27/8, 2016 at 19:11

3

Solved

As staten in the ionic-angular 3.9.0 release notes (https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md), using the advantages of updating to RXJS 5.5.2 could reduce the bundle size and th...
Thermosiphon asked 9/11, 2017 at 11:18

12

Solved

My service class, before calling a web service, needs to get a property called dataForUpdate from my state. Currently, I'm doing it like this: constructor(public _store: Store < AppState > ,...
Dropsical asked 25/2, 2016 at 17:3

5

Solved

I'm wondering what are the differences between Observable.combineLatest and Observable.forkJoin? As far as I can see, the only difference is forkJoin expects the Observables to be completed, while ...
Succuss asked 22/1, 2017 at 23:46

13

I dont know how to extract value from Observable to be returned by function in which Observable is present. I need just a value from it to be returned, nothing else. Current version which works f...
Borghese asked 10/7, 2016 at 12:18

4

I want to call a function (synchronously) and then use its return value as an initial emission (subsequently chaining some other operators on the resulting observable). I want to invoke this functi...
Alberthaalberti asked 2/1, 2017 at 19:31

2

Solved

I have a hot Observable fed by a socket. I can use the pausable to pause the socket feed. But once I 'unpause' the observable, I need to display the last values that the socket could have sent whil...
Scalar asked 10/12, 2016 at 15:47

9

Solved

tl;dr: Basically I want to marry Angular's ngOnDestroy with the Rxjs takeUntil() operator. -- is that possible? I have an Angular component that opens several Rxjs subscriptions. These need to be ...
Indigestive asked 27/2, 2017 at 16:1

2

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 ...
Intermeddle asked 3/6, 2016 at 6:30

4

Solved

I have to test a function that uses the fromEvent observable function. Before the upgrade to 'lettable' operators, I was just doing this: spyOn(Observable, 'fromEvent').and.callFake(mockFromEven...
Eterne asked 24/1, 2018 at 11:3

7

Solved

I'm trying to use forkJoin on two Observables. One of them starts as a stream... If I subscribe to them directly I get a response, forkJoin isn't firing though. Any ideas? private data$: Observable...
Suki asked 15/3, 2017 at 12:23

7

Solved

If I have a Node js stream, say for example from something like process.stdin or from fs.createReadStream, how can I convert this to be an RxJs Observable stream using RxJs5? I see that RxJs-Node ...
Ticktock asked 8/1, 2017 at 20:27

5

Solved

I've been trying to get a draggable div working using Angular 2. I'm using this example from the angular2-examples repo as a starting point, only really adjusting the code to account for the remova...
Cohby asked 29/3, 2016 at 1:14

4

Solved

I have the following code inside my constructor: this.searchResults = this.searchTerm.valueChanges .debounceTime(500) .distinctUntilChanged() .switchMap(term => this.apiService.search({ lim...
Dory asked 20/2, 2017 at 0:19

6

Solved

My backend frequently returns data as an array inside an RxJS 5 Observable (I'm using Angular 2). I often find myself wanting to process the array items individually with RxJS operators and I do s...
Sax asked 27/2, 2017 at 9:59

8

Solved

I am using ngrx/effects. How can I dispatch an empty action? This is how I am doing now: @Effect() foo$ = this.actions$ .ofType(Actions.FOO) .withLatestFrom(this.store, (action, state) => ...
Sped asked 29/9, 2016 at 5:7

11

When trying to extend a class from a class in a node_modules the typescript compiler throws a error saying: Property 'source' is protected but type 'Observable<T>' is not a class derived fr...
Capet asked 3/7, 2016 at 9:30

2

Solved

I am moving from the Promise world to the Observable world. One thing I usually do with Promise is to chain a series of tasks and make them run in sequence. For example, I have three tasks: printLo...
Coitus asked 11/4, 2017 at 4:3

4

Solved

How to tell the version of the installed RxJS from the code? For example: var Rx = require('rxjs/Rx'); console.log(Rx.rev); // undefined console.log(Rx.version); // undefined Second question: Ho...
Cini asked 23/9, 2016 at 15:19

2

Solved

I have some trouble to understand this. When I use the switchMap operator with an Observable it emits all the values as expected: Observable.from([1, 2, 3, 4, 5]) .do(console.log) .switchMap(i =...
Bricabrac asked 17/2, 2018 at 16:32

2

Solved

I run tsc on my project, and I get these errors relating to the RxJS5 lib: $ tsc node_modules/rxjs/observable/FromEventObservable.d.ts(11,39): error TS2304: Cannot find name 'EventTarget'. node_mo...
Gnathion asked 18/4, 2018 at 18:15

4

I'm trying to use RxJS for a simple short poll. It needs to make a request once every delay seconds to the location path on the server, ending once one of two conditions are reached: either the cal...
Quartas asked 2/3, 2016 at 20:48

4

Solved

My goal is to create an animation loop à la requestAnimationFrame so that I could do something like this: animationObservable.subscribe(() => { // drawing code here }); I tried this code as ...
Dialyse asked 24/1, 2017 at 1:59

4

Solved

I am wondering what is the use of asObservable: As per docs: An observable sequence that hides the identity of the source sequence. But why would you need to hide the sequence?
Perjury asked 2/5, 2016 at 15:52

2

Solved

I'm learning RxJS and Angular 2. Let's say I have a promise chain with multiple async function calls which depend on the previous one's result which looks like: var promiseChain = new Promise((re...
Brickyard asked 12/6, 2016 at 7:42

© 2022 - 2025 — McMap. All rights reserved.