rxjs6 Questions

6

The abstract problem Is there any way to consume the result of a mergeMap in the original order of the outer observable, while still allowing the inner observables to run in parallel? More detaile...
Fertile asked 15/7, 2019 at 19:13

9

Solved

Currently have a scenario where a method within a shared service is used by multiple components. This method makes an HTTP call to an endpoint that will always have the same response and returns an...
Gerbold asked 14/6, 2018 at 19:56

6

The old code uses rxjs v5.5.12, We copied the same code to our new project which uses rxjs v6.4.0. We are getting this error when we tried to run the test case. Old Code: import * as ObservableEv...
Bessbessarabia asked 26/7, 2019 at 6:24

11

I am trying to upgrade my Angular 9 app to Angular 10 version, but I am getting the below warning after the upgrade rxjs\BehaviorSubject.js depends on rxjs-compat/BehaviorSubject How can I fix th...
Illusion asked 26/6, 2020 at 10:34

3

Solved

Using RxJS v6 is challenging to retrieve data from sub collection for every item in the loop. There is no way to iterate throw array that is retrieved from HTTP call. Merge map does it only for sin...
Redskin asked 4/4, 2019 at 13:3

3

I've been trying to get Jest working with RxJS and am having trouble with Jest not propagating errors from inside the subscribe callback. Here is a sample test I've tried that is not working: i...
Photoflood asked 18/12, 2018 at 4:32

3

Using Rxjs 6 I keep getting, Error: CORS is not supported by your browser My code is pretty simple, import { ajax } from 'rxjs/ajax'; const ajax$ = ajax({ url: genURL_chan(179), crossDomai...
Merciful asked 31/7, 2018 at 0:8

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

4

Solved

I have updated code that worked fine with Angular 5.5/rxJS5.5 using the new pipe method to Angular 6/rxJS6 using the rxjs-lint package and the following commands npm i -g rxjs-tslint rxjs-5-to-6-m...
Dagon asked 18/5, 2018 at 14:1

7

Solved

Why is the view not being updated when a variable changes within a subscribe? I have this code: example.component.ts testVariable: string; ngOnInit() { this.testVariable = 'foo'; this.someSe...
Exquisite asked 24/5, 2018 at 22:45

3

Solved

source<http> .pipe( switchMap(d => this.http.get(d)) .pipe( switchMap(j => this.http.get(j)) ) ) .subscribe() Hello, I need to make 3 http requests consecutively where each cal...
Chausses asked 2/1, 2020 at 22:32

3

Solved

I have a simple interceptor that handles requests and catches any http error using RXJS catchError. The second argument received in catchError is the caught observable. I want to, in some cases, re...
Memorabilia asked 21/8, 2018 at 12:27

6

Solved

After running the rxjs migration tool using rxjs-5-to-6-migrate -p src/tsconfig.app.json I'm now getting a linting error: combineLatest is deprecated: Deprecated in favor of static combine...
Disgorge asked 10/5, 2018 at 15:12

4

Solved

Can anyone help with the scenario where this._getReactions$.next() not working whenever this.http.get(...) gets an error. I want to keep observable alive to take the next input. private _getRe...
Thyrse asked 17/9, 2018 at 14:54

3

I have this code snippet: SubmitTransaction(transNumber: string, transactionRequest: ITransactionRequestObj): Observable<TransactionResponse> { this.body = JSON.stringify(transactionReques...
Overcoat asked 4/8, 2018 at 16:11

15

Solved

Typescript code: import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { of } from 'rxjs/observable/of'; import { Hero } from './hero'; import { HERO...
Slatternly asked 15/4, 2018 at 8:49

2

Solved

I'm trying to implement a togglable auto-save feature using RxJS streams. The goal is to: While auto-save is enabled, send changes to the server as they come. While auto-save is disabled, buffer ...
Gerrit asked 22/2, 2019 at 14:21

2

Solved

cdSo I'm trying to migrate some of my Angular 5 code to 6, and I understand most of the changes required for rxjs to work using the .pipe() operator. It works as you would expect for 'pipable' oper...
Burnet asked 9/5, 2018 at 3:42

2

Solved

I just want to sort data on an observable of my class type 'Category'. So Observable < Category[] > I want to sort. So I upgraded to Angular6 and rxjs6 with it. One issue that is probably simpl...
Florettaflorette asked 10/5, 2018 at 14:56

6

Solved

I've been looking for a solution all over the web, but couldn't find anything that fits my user case. I'm using the MEAN stack (Angular 6) and I have a registration form. I'm looking for a way to e...
Talia asked 30/11, 2018 at 15:43

3

Solved

For rxjs, can I provide an initial value when using distinctUntilChanged? It seems that the equals check is skipped entirely when no previous value was received. I'd like to not emit anything when ...
Pertinacious asked 16/8, 2018 at 12:17

4

Solved

I'm building a simple stopwatch with angular/rxjs6, I can start the timer but I can't pause/resume it. source: Observable<number>; subscribe: Subscription; start() { this.source = timer...
Cajole asked 1/10, 2018 at 19:51

6

Solved

I have a code to fetch book and library card associated with it: // mimic http requests const fetchBook = (bookId: number) => { const title = 'Book' + bookId; return timer(200).pipe(mapTo({ bo...
Rhymester asked 11/8, 2021 at 9:14

4

Solved

In RxJS 6, how do I import a static merge function for merging a list of Observables? I want to be able to do: const merged$ = merge( obs1$, obs2$, obs3$ ); I've tried: import { merge } fro...
Spectrophotometer asked 27/4, 2018 at 12:0

3

Solved

I have read the throttleTime documentation, but I don't get the operator fully. I know how throttleTime(1000) works. After an event arrives it will skip all subsequent events for 1 second and then...
Falconer asked 16/7, 2019 at 14:30

© 2022 - 2025 — McMap. All rights reserved.