All Questions
14,150 questions
1
vote
1
answer
45
views
Data not being displayed on template but data is fetched
I am trying to display data using rxResource. However, data returned is always undefined. However, inspecting the network tabs shows the data is indeed being fetched and I'm just doing something wrong ...
2
votes
1
answer
45
views
How do I return two http requests sequentially in rxjs and use data from first in second call?
I've written a http function that works using switch map to get the value from one http request and use it as a parameter in the second, but how do I return not only the final http request but also ...
1
vote
1
answer
87
views
Retry HTTP request
I have Angular service which is used in the Angular pipe. The job of that service is to do a HTTP request and fetch translations. Idea is to have a pipe which returns a Observable that only first ...
0
votes
1
answer
67
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 ...
0
votes
3
answers
91
views
Filter observable without triggering HTTP request
I populate a grid with the following line of code:
this.gridData$ = this.userService.getUsers();
and this is the corresponding HTML:
[kendoGridBinding]="(gridData$ | async)!"
It works as ...
4
votes
1
answer
59
views
Encapsulate behaviorSubject in a service
I would like to hide the "next" interface of a BehaviorSubject while retaining its other properties, especially the possibility to get last emitted value imperatively. The idea is all state ...
1
vote
1
answer
72
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 ...
1
vote
0
answers
89
views
Auto login with firebase authentication
I'm looking for a great solution for firebase authentication. I use angular with ngrx and firebase. I made authentication with these technologies but when I tried to implement auto login, it actually ...
1
vote
1
answer
52
views
Initial value not displayed on mat-select component using async pipe
I'm trying to use a material select component that gets its values through an Observable with async pipe.
template:
<mat-form-field>
<mat-select
value="selectedOption$ | async&...
0
votes
0
answers
31
views
OnInit Block with readCSV subscribe/observable function yields inconsistent results
I have an Angular OnInit block inside my "Dashboard.component" that reads a CSV file and populates a web page. If my webpage is called from my "Home.Component" web page, then the ...
1
vote
2
answers
53
views
How To Combine Responses Using RxJS merge() & from()
I have to make n (user defined) http calls. The URLs are generated programatically from user inputs. Each month must be queried separately, so n depends on the date range the user has selected. In the ...
1
vote
3
answers
164
views
How to test Angular's resource() / rxResource()?
I am trying to unittest a service which uses the new rxResource utility, introduced in Angular 19:
import { computed, inject, Injectable, signal } from '@angular/core';
import { rxResource } from '@...
0
votes
1
answer
48
views
How can I continue refreshing an observable on button click when an observable error occurs in Angular?
I'm working on an Angular application where I fetch data from an API and display it using my custom state pipe and async pipe. There is a button to refresh the API call. However, if an error occurs, ...
1
vote
1
answer
40
views
Continue running upon result from modal dialog
The following code is for modal dialog component.
I want it to act like "confirm".
Running will proceed only after clicking 'yes' (return true) or 'no' (return false) in the dialog.
import { ...
2
votes
1
answer
86
views
Angular signalStore and HttpResource
const apiUrl = environment.apiUrl;
export const PublisherStore = signalStore(
withState(initialState),
withComputed(({fetchStatus, saveFetchStatus}) => ({
fetchPending: computed(() => ...