21,339 questions
Advice
0
votes
3
replies
46
views
Handling and error checking with RxJs HTTP calls
I'm working with Angular 21 and I've added an interceptor like this:
export const httpErrorInterceptor: HttpInterceptorFn = (req, next) => {
return next(req).pipe(
catchError((error: ...
-3
votes
0
answers
32
views
request is not generating properly for websocket | Angular
getLiveGraph(uid: number, timeOut: number) {
const config = this.configStore.getData();
return webSocket<LiveGraph>(
`${config.wsBaseUrl}/subscriber/${uid}/live_graph/${timeOut}`
...
0
votes
0
answers
90
views
Angular 21 Vitest, FakeTimers and RxJS debounceTime
I could successfully migrate my Angular 20/Jasmine/Karma app to Angula r21/Vitest
All my tests are running correctly, except the ones that use debounceTime from RxJS
As a workaround for now, ny unit ...
1
vote
0
answers
43
views
Angular table fails to update after CRUD success
My app uses a facade service (singleton injectable) with signals for state management and RxJS for API calls.
I'm experiencing an inconsistent UI update problem with a table after a successful create ...
1
vote
1
answer
60
views
Is it possible to read stale data from an object passed by reference between parent and child components?
I'm working with Angular and have a scenario where a parent component passes an object (e.g., product) to a child component via property binding ([product]="product").
The child component ...
1
vote
1
answer
56
views
How to prevent RxJS to stop pipeline execution on the first exception
I'm trying to make 3 sequential GET requests using RxJS ajax operator. If one of the ajax requests throws an error(404 status code, for example), the rest won't execute. Is it possible pipeline to ...
-3
votes
1
answer
91
views
Usage of tap({ error }) vs. catchError for side effects [closed]
In Angular/RxJS, when should you use tap({ error }) and when catchError for side effects? How do you best separate the two logically or combine them?
For example, does resetting the UI to its previous ...
0
votes
1
answer
73
views
Strange behavior in compiled Angular 18 application TypeError: this._serviceXXXXXXXX is not a function
We are facing strange error in our application, some users facing problems with export functionality. Code below is what we have in our codebase:
exportProcess = this.exportProcessSubject.pipe(
...
1
vote
1
answer
98
views
Duplicate requests to backend API while implementing autosuggest functionality
I am trying to implement autosuggest functionality in my Angular app.
The desired flow should be as:
user types in something
an autosuggest list will populate
user may select one item from the list ...
3
votes
1
answer
34
views
RxJS switchmap-like operator that gives me the result of the first observable too
Suppose I want to do the following
this.http.get(...).pipe(
switchMap(httpResult => this.database.storeValue(httpResult.objectA)
).subscribe((databaseResult) => {
// I have lost the ...
1
vote
1
answer
182
views
How to understand and fix this npm dependency issue with rxjs when updating Angular
I spent hours reading about npm dependencies issues here, but I still don't really understand most dependencies error messages, they often don't really make sense and sometimes the dependency ...
0
votes
1
answer
108
views
After DELETE callback works in same file but not in a service
I am making an Angular frontend and got really unexpected behaviour after an HTTP DELETE call.
When in component code I call directly HttpClient.delete, it logs 'test'.
If I call the delete in a ...
1
vote
2
answers
120
views
How can I run a concurrent mergeMap in RxJS with a variable batch size?
I have a stream of predicates I want to send to an API to execute. I only need to identify the first four (for example) that return true.
Although I can send API requests in parallel, each API call is ...
4
votes
1
answer
84
views
Should we use NgZone.runOutsideAngular() when handling fromEvent with filters in Angular
I came across this implementation of the outsideCLick directive
ngOnInit() {
this._ngZone.runOutsideAngular(() => {
fromEvent<MouseEvent>(document, DomEventsEnum.MOUSEDOWN, { ...
1
vote
1
answer
107
views
TS2740: Type '{}' is missing the following properties from type 'ExpenseModel[]': length, pop, push, concat, and 26 more
[ERROR] TS2740: Type '{}' is missing the following properties from type 'ExpenseModel[]': length, pop, push, concat, and 26 more. [plugin angular-compiler]
src/app/modules/expenses/pages/expenses-...