Skip to main content

All Questions

0 votes
1 answer
63 views

How to subscribe while creating an observable?

I have an observable emitting an ID. I want to retrieve an element with that Id and store it into a new observable. However, this observable needs to be subscribed to in order to emit its value. ...
TheBlackBird's user avatar
0 votes
2 answers
345 views

Combining two observable sources filtering by one first observable property

Having an observable emitting a list of users with the next content: [ { "id": 1, "name": "John", "status": "Active" },...
frankfullstack's user avatar
0 votes
1 answer
308 views

RxJS how to fire two http requests in parallel but wait for first to complete before second value is emitted

I have a UI where I display details about a Game. The view has two tabs, one with the details and one with the screenshots. To construct the Model for the View, I need to get data from 2 different ...
floroz's user avatar
  • 413
3 votes
1 answer
3k views

How to wait for an observable to complete before continuing with the next one? [duplicate]

I'm starting to learn the observables, I have some questions about how to do the following: I have an array of objects. I want to consume an API for each item in the array. For each response I want ...
jonathan's user avatar
0 votes
1 answer
180 views

How to call a SERVICE inside a Merge Scan when using the Reactive Approach RXJS in Angular

I am trying to use the reactive approach in my angular app and I am having trouble calling a service inside a scan. How do I do this? It seems the service returns an observable - how do I deal with ...
Gani Lastra's user avatar
0 votes
2 answers
328 views

Angular - Update view on changes

I have a page that displays a list of users, when I add a new user (using a form) the list doesn't immediately displays the new user that i added, but i need to reload the page to see the updated list ...
juniorDev's user avatar
0 votes
1 answer
231 views

Using `distinctUntilKeyChanged` or on a bufferTime array

I have this buffer, which every x seconds, will provide a buffer of an array of the last provide values to this.queue.next() const queue = new Subject() const bufferTimeObserver = queue.pipe( ...
TrySpace's user avatar
  • 2,470
0 votes
2 answers
1k views

How to trigger http call inside switchMap when BehaviorSubject value is emitted

I'm learning to write angular applications in a declarative and I'm not sure what the best approach is when calling POST requests. I have a login form with email and password forms which when a user ...
Aldin Muratovic's user avatar
3 votes
3 answers
2k views

Rxjs: map each element in an array field from an observable of object with another observable

I have a method called getTransactionDetails(id:string), and it returns an Observable of TransactionDetails object getTransactionDetails(id:string):Observable<TransactionDetails> The ...
STH's user avatar
  • 123
2 votes
1 answer
3k views

Use takeWhile operator with different Observable source as a flag

I want to unsubscribe from an observable by using another observable source. stop$: Subject<boolean> = new Subject<boolean>(); source: Subject<string> = new Subject<string>(); ...
mtnp's user avatar
  • 389
1 vote
3 answers
947 views

RxJS sequential delay between emissions

I have a Observable observableA. How can I create another Observable observableB which emits value from observableA, but the time between each emission is at least 1000 milliseconds? For example: ...
code đờ's user avatar
0 votes
5 answers
2k views

How do I partition an observable of an array of values in one step still utilizing async pipe?

I receive an observable containing an array of objects. I want to partition the array into two based on a property of each object. I'd like to do this in such a way that the resulting arrays are in ...
nshew13's user avatar
  • 3,097
0 votes
1 answer
208 views

Rxjs observable is subscribed twice

I am starting with rxjs library, trying to make requests to an API REST. The problem i got i that the code inside the subscribe is executed two times but is just called once The observable method, ...
hugoboss's user avatar
0 votes
0 answers
99 views

Can't change fields (set new values) of the object from an observable

I have two functions. One is meant for getting an observable and the second for saving it. I would like to call the first function, extract the object from the corresponding observable, change some ...
SkogensKonung's user avatar
3 votes
0 answers
267 views

Replaying events using rxjs. Or how to use rxjs with tick-time instead of wallclock-time

I'm looking into using reactive programming, specifically rxjs, for building logic on top of large event streams I need to process. This involves doing a lot of time-related stuff such as generating a ...
Geert-Jan's user avatar
  • 19k

15 30 50 per page
1
2 3 4 5
9