Skip to main content
4 votes
1 answer
56 views

How to make one MergeMap Observable sequence to start a new one after one is completed?

I need to upload a list of files while ensuring no more than 5 files are uploaded simultaneously. While my code already limits concurrent uploads to 5, it waits for all 5 files in a batch to finish ...
rafaelpadu's user avatar
  • 1,856
0 votes
1 answer
160 views

How do I set an empty array as default value in toSignal?

I have a DataHandler service that calls a database service and returns the value to the calling component. The database service returns an observable of an array, while I'd like the data handler to ...
Otto Abnormalverbraucher's user avatar
1 vote
1 answer
80 views

Angular rxjs, multiple subscriptions with subject and mergeMap

I have a service that notifies that an array of categories has been filled (via a call to an API on the bootstrap of the application). As soon as these categories are ready I have to start a call to ...
berno's user avatar
  • 253
0 votes
1 answer
33 views

groupBy: Modify existing group based on incoming values

Using RxJS, I have the code below: const { Subject, groupBy, mergeMap, toArray, timer, map } = require('rxjs'); const waitTime = 1000 const mySource = new Subject(); mySource .pipe( groupBy( ...
cis's user avatar
  • 1,403
0 votes
1 answer
55 views

Keep values on hold and compare new values with those on hold

Using one Observable in RxJS, all incoming values should be treated like such: Keep each value on hold for N seconds. If within those N seconds, another value matching a custom matcher comes in, ...
cis's user avatar
  • 1,403
1 vote
2 answers
85 views

Question about managing Observables in Angular 14

I'm new to Angular and right now I'm using Angular 14 and I have a problem that happens to me often. For example, I have an array and I make a for loop to go through each of its indexes and I make a ...
Sergio Cea's user avatar
-1 votes
1 answer
41 views

I have problem in RX js observable, where I am not able to get the desired output from combineLatest operator

Below observable does not give the right results customerWithProjects$ = combineLatest([this.customers$, this.projects$]).pipe( map(([customers, projects]) => { return projects.map((...
Deepak's user avatar
  • 33
1 vote
2 answers
119 views

RxJS complete Observable from within switchmap

I have an HTTP call that does a switchMap to a Promise<boolean>. If that promise returns false, I need it to close the observable. Here is some example code private method2() : Observable<...
Wouter Vandenputte's user avatar
0 votes
1 answer
110 views

valueChanges is still triggered even when using { emitEvent: false, onlySelf: true }

I would like to change value of FormControl in Angular 12. So I refered to this ticket and none of it helped: ValueChanges on FormControl triggers when Form.enable, even with emitEvent: false Here is ...
Yegor Petrov's user avatar
0 votes
1 answer
75 views

How to pass an array of pipable operators to pipe()?

[Angular 12]I have a service with a method, handleFormControlChanges, which accepts, a formControl, a destroy subject, a method and an array of pipable operators (e.g., delay), and I would like to ...
Yegor Petrov's user avatar
1 vote
0 answers
101 views

Using ShareReplay() and to cache result of observable - how to refresh and use new value in another observable

I am using shareReplay() to cache an http call so it isn't repeated. However, at some point, I need to refresh the API call. Following various suggestions in stackoverflow, I introduce a Subject, so ...
Billy's user avatar
  • 419
1 vote
1 answer
40 views

TypeScript Return Type Conflict with RxJS's combineLatest

I'm working with RxJS in a TypeScript project and attempting to use the combineLatest function. I've defined the following method: myMethod(): Observable<{ one: string }> { return ...
Karel Čančara's user avatar
0 votes
1 answer
110 views

How properly subscribe to observable paramMap Angular?

I can get params from paramMap: this.route.paramMap.subscribe((params: ParamMap) => { this.templateService.get(+params.get("id")!).subscribe((response: Json | JsonError) => { ... ...
A. Gladkiy's user avatar
  • 3,502
0 votes
2 answers
68 views

Observable data lost on API call

so I am using Spartacus as the base of the project. In spartacus the data for the product is caught with this search method: search(query: string | undefined, searchConfig?: SearchConfig): void { if ...
Skafec's user avatar
  • 49
2 votes
3 answers
225 views

How to modify data in an angular component when using async pipe

I have an Angular 18 component that receives an observable, which I render on the page using an async pipe. I want to be able to modify the data within this component and then press a "Save"...
Chris Barr's user avatar
  • 34.6k

15 30 50 per page
1
2 3 4 5
54