All Questions
75 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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
0
votes
1
answer
812
views
RxJS: Get multiple response
I have 'nested' requests, team creation and team avatar uploading, wherein second depends on first and should be sent only if avatar is not null (I've already done this using filter operator). What I ...
0
votes
2
answers
371
views
RXJS: pipe observable on condition
I have post request to create team on my website and put request to upload avatar for my team.
In team creation form there is field for avatar upload.
After user submits a form, create request is ...
0
votes
0
answers
49
views
Asynchronous Handling of Observables
I am fairly new to rxjs and reactive programming in general and I have got a fair bit of grey area surrounding the async handling of observables.
I have a straight forward scenario with routing a ...
1
vote
2
answers
929
views
Multiple RXJS BehaviorSubjects to trigger function call
I want to run a computation intensive function that depends on the latest value of 3 behaviorSubjects.
Sometimes all subjects change at the same time and I do not want to run the calculation 3-times.
...
1
vote
2
answers
721
views
How to perform business logic while using async pipes?
I have been using async pipes for straight binding like:
component.ts:
uiData$ = this.someService.uiData$;
HTML:
<ng-container *ngIf="uiData$ | async as holdingData">
Recently there have been ...
5
votes
1
answer
1k
views
BehaviorSubject used as PartialObserver breaks the subscription on BehaviorSubject
I was looking through the interfaces of observables and saw you can pass anything that implements PartialObserver to the subscribe function. So I did that with BehaviorSubject.
Like this (A)
source$
...