Questions tagged [rxjs-observables]
The rxjs-observables tag has no usage guidance.
rxjs-observables
784
questions
2
votes
2
answers
60
views
RXJS - Using concatMap dynamically
I am attempting to do in order async manipulation of strings in an array. The class has an array of objects that have a transform method that return an observable. Each transform call depends on the ...
1
vote
1
answer
39
views
Refactor Nested Subscriptions properly for Event Listening
I have a special situation where the usual usage of "switchMap" to avoid nested subscriptions just doesn't cut it.
I discovered this code, that uses nested subscriptions, and wanted to ...
0
votes
0
answers
24
views
How can I unit test an RxJS effect that uses a withLatestFrom operator to call another service
I have an RxJs effect that uses a withLatestFrom operator, within my action pipe, to retrieve some state from the store. When it comes to unit testing, I'm getting the following error concerning ...
1
vote
1
answer
29
views
Infinity loop with using Ngrx dispatcher in canActivate
I have authGuard in my angular 17 project. I'm trying to dispatch my new token value to store but i got infinity loop.
When i use this ligne in my canActivate code(i get infinity loop) :
this.store....
0
votes
2
answers
53
views
TypeError: Cannot read properties of undefined (reading 'filter') in Angular RxJS subscription
I'm encountering a TypeError in my Angular component with RxJS observables. The error message "TypeError: Cannot read properties of undefined (reading 'filter')" is pointing to my usage of ...
0
votes
2
answers
39
views
Angular 15, .pipe .subscription response modifications
let data = { ticketId: id };
this.apiService
.call("tickets", "/detail", "GET", true, data, null)
.pipe(first())
.subscribe(
(data) => {
data = this....
0
votes
1
answer
26
views
RxJS error: TypeError: finalizer.unsubscribe is not a function
This sample code throws an error when running on rxjs 7.8.1:
import { Observable } from 'rxjs';
new Observable((sub) => {
return setTimeout(() => {
sub.next("Test");
...
0
votes
0
answers
18
views
how to track component calling in Angular store application
working on a huge angular application which uses angular store. a popup is opened on in click and dispatch a action for showing data. now the popup is displayed with other activity on the application ...
2
votes
1
answer
76
views
Why does RXJS Observable stops emitting after getting error
I am trying to access datas every time the user changes the input value.
The search can return an error.
In this case, I want to disable the use of AI (semanticDisabled) for future searchs and then ...
0
votes
1
answer
62
views
Code inside subscription of Http observable is not executed
We have an Angular 16.x.x based FE application where when we have an Observable for http request for orders checkout.component. We have placed a toastr inside .next() of the subscription along with a ...
1
vote
1
answer
47
views
Observable not updated IF empty
I came across this strange behavior by the rxjs-"filter".
Environment:
SAP ComposableStorefront / Spartacus "~2211.21.0"
angular 17.2.0
I'M on a product Detail Page and apply a ...
1
vote
0
answers
68
views
In angular Rxjs catchError fails with TypeError
I am trying to send post request to create/update user. When I get 400 response, the catchError function fails with
TypeError: You provided an invalid object where a stream was expected.
You can ...
1
vote
1
answer
47
views
My function returns the observable only once
I have the following service:
// transloco-loader.ts
import { inject, Injectable } from '@angular/core';
import {TranslocoLoader } from '@ngneat/transloco';
import { map, take} from 'rxjs';
import { ...
1
vote
2
answers
205
views
Passing Data Between Components in Angular using a service with a RxJS subject
What I'm Trying To Do
I have two unrelated components in my Angular client app. The first component is responsible for fetching and processing data from the server. I'm trying to use the subscribe ...
1
vote
1
answer
54
views
Signal-based utility keeping track of multiple async operations performed with observables
I need a Signal-based utility to keep track of the status of multiple async operations performed with observables (e.g. HTTP calls). So I can use those signals also in Components using the OnPush ...