Skip to main content

All Questions

1 vote
3 answers
149 views

Monitoring API Response from angular

I'm trying to monitor an api response to know if the user is currently logged in or not. To do so, I'm sending a get request to /api/status along with the http-only cookie. the endpoint should respond ...
ht990332's user avatar
8 votes
2 answers
12k views

How to compute Angular signal from Observable?

I have started to slowly embrace the new Angular's Signal in my projects. I stumbled upon the following scenario, and while it works, I wonder if this is the "Angular way" of doing it. In my ...
kari's user avatar
  • 222
3 votes
3 answers
384 views

Is this angular component implemented in a reactive way?

I'm starting with reactive programming and I have the following application: The three dotted items is a <ul> tag. Each time a li item is clicked, the app navigates to a route using the ...
Marlonchosky's user avatar
1 vote
2 answers
151 views

RXJS dependent observables

I have 3 observables: query$: Observable<string> = this.q$.pipe(tap(() => this.page$.next(0)); filter$: Observable<number> = this.f$.pipe(tap(() => this.page$.next(0)); page$ = new ...
fuji's user avatar
  • 343
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
2 votes
0 answers
56k views

RxJS websocket how to resubscribe listening to the events when socket reconnects

I have created an angular service for websocket using RxJS. I have handled the ping/pong and also reconnecting using retry operator my Websocket Service looks like export class SocketService ...
cmgchess's user avatar
  • 10.3k
0 votes
1 answer
134 views

How to subscribe after unsubscribe?

I have an angular service with three attributes and two functions: timerSubscription: Subscription; pollingSubscription: Subscription; incrementTimerSubscription: Subscription; async startTimer(...
Andy88's user avatar
  • 767
0 votes
3 answers
185 views

Initialize a Behavioursubject with a function call

I have an angular service that is supposed to send data to 2 components that display it simultaneously and both can change that data which changes the display of it on both components. I have chosen ...
Evis's user avatar
  • 1
0 votes
1 answer
124 views

SwitchMap from one outer observable to multiple innser observables

I have a method which makes a http request to delete all records and then makes another http request to add a new record, for each record in the records array (I am not expecting the below code to ...
Pablo52's user avatar
  • 111
1 vote
3 answers
969 views

Toggling value of behavior subject without using getValue

I want to toggle the boolean value of my behavior subject. I'm currently achieving this by using the Behavior Subject's getValue() method. This isn't ideal as I'm effectively taking my reactive, ...
Pablo52's user avatar
  • 111
0 votes
1 answer
1k views

How to get current initial value of Angular form control using RxJs

I have a situation where I need to listen to the value of the form control from a different component. the valueChanges does this just fine for any changes in the dropdown. However I get a null upon ...
RDK's user avatar
  • 107
3 votes
3 answers
3k views

Reactive Loading state management with RxJs

A classic task when you have some input field and you have to fetch something on values changes. Let's imagine we use Angular Reactive Forms. Example: orders$ = inputControl.valueChanges.pipe( ...
ectuser's user avatar
  • 170
0 votes
1 answer
67 views

RXJS, Is there a way to wait inside an operator for a subscription to end before continuing the workflow?

So, i am new to RXJS, and i have checked a lot of stackoverflow and documentation before coming here and asking this, but i'm finding a hard time to make my logic work. I have an Observable that will ...
Mohamed Ghost's user avatar
0 votes
1 answer
123 views

Using RxJs/Reactive programming - how can I get a related entity?

I have two entities: Organization and User. In my component, I have access to the currently authenticated user like this: // component.ts public authenticatedUser$ = this._authService....
Damon's user avatar
  • 4,544
0 votes
0 answers
53 views

retryWhen barred in VSCode

Hello I have the retryWhen pipeable function barred in VScode, it seem like a deprecated method, do you have any idea about this:
Abdel's user avatar
  • 63

15 30 50 per page
1
2 3 4 5
17