967 questions
0 votes
1 answer
203 views
Compiling Angular app: Error: export 'ɵwithHttpTransferCache' (imported as 'ɵwithHttpTransferCache') was not found in '@angular/common/http'
I've recently updated my app to Angular 17 and I'm getting this weird error at compile time: ./node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:2016:81-103 Error: export '...
19 votes
7 answers
33k views
Interceptor not intercepting in Angular 17
I'm learning angular through course and currently I'm learning about Interceptors. The angular version in the course isn't 17 but the one which I'm using in my local is. So, after 1st trying to ...
0 votes
0 answers
214 views
Angular 17, possible encode http params on the fly?
I have an application with quite a few inputs already. When the user enters a special character like an & it results in an API error. Which makes sense given what's being set is something like: ...
0 votes
0 answers
145 views
Perfect Way Of Making Http Calls In Angular
In the context of the discussion at https://stackoverflow.com/a/35043309/19365092, it is advisable to avoid using the subscribe method for HTTP calls. The reason is that while it is true that ...
1 vote
2 answers
217 views
I need an Angular Observable returning single value but without initial value
I need something like an Observable that calls a webservice exactly once, and return its result to all subscribers. Subscriptions may happen before or after the call. How can I do that? A Subject will ...
0 votes
1 answer
177 views
How can I post mat-form to API in angular
I have form, and I want post form values to API, but the values can not be posted, how can resolve this error? my html form: <form #adduser ="ngForm" (ngSubmit)="onAddUser(adduser....
-1 votes
1 answer
1k views
Using the angular httpclient i receive this error TypeError: Cannot read properties of undefined (reading 'get')
I have to make an http request via Angular but the error written in the title appears whether I use 'post' or 'get' as if the http variable was undefined or uninitialized. I checked the module and is ...
0 votes
1 answer
61 views
Angular get string instead HTTPReponse object
I have an issue because err is returning a string instead of a HttpResponse. I am not sure why, the server returns the content type as "application/json". Version of Angular is 13. return ...
1 vote
4 answers
2k views
How to start loop from index 1 instead of index 0 in *ngFor loop in angular?
I am currently getting some data from a dummy api, data from response starts from 1 and the index is currently starting from 0. How I can start the index loop from 1 instead of 0? Following the html ...
0 votes
2 answers
1k views
Angular retry http request on a specific successful response (not error)
I know we can retry a failed HTTP API request through retry or retryWhen pipe mehtods from rxjs. I want to do something similar on a successful API call, based on a particular condition in the ...
1 vote
1 answer
824 views
How to return value outside subscribe Angular
Template <div class="row" *ngFor="let otc of this.jsonData;index as j"> <div> <table class="table table-striped table-fixed"> ...
0 votes
1 answer
390 views
How to return list inside subscribe Angular
winServiceInfo() { this.dataArrs=[] this.winServiceURL = JSON.parse(this.WinService[0].windowsServicesInfo)["Stactuscheck"]; this.service.getWinServicesInfo(this.winServiceURL) ...
0 votes
1 answer
41 views
Undefined response request while using get HttpClient api call in angular 10
On doing console.log of Api response I get undefined as output. Since I am new to angular your feedback and suggestions would be of great help. Here is the raw response that I get from the api get ...
1 vote
2 answers
747 views
Angular wait service subscription from component?
I have a problem filling a Users autocomplete on first load. This is my UsersService: public users: User[] = []; constructor(private http: HttpClient) { this.http.get<User[]>(environment....
0 votes
1 answer
1k views
Angular replaced @angular/http with @angular/common/http
I am in the process of upgrading my project and need to change my api from @angular/http to @angular/common/http. I main question do I just need to change the import or will the code need to change? ...