967 questions
0
votes
1
answer
199
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 '...
0
votes
0
answers
210
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:
...
1
vote
2
answers
211
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 ...
-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 ...
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 ...
1
vote
1
answer
820
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
40
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 ...
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?
...
0
votes
1
answer
182
views
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. Getting this in get API
This Error is coming when I am trying to show the data from an get api on html template using ngfor in angular
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. ...
0
votes
2
answers
703
views
Default response type get request angular
I have a service like
getOrganizationsFile() {
return this.http.get(`${this.baseUrl}/export`, {
responseType: 'blob',
observe: 'response',
});
}
and I call it in the TS file like
...
0
votes
1
answer
225
views
Angular-RxJS- Hide spinner in the middle of long API call and continue API call
The response time of the API call varies between 2 and 30 seconds.
After initializing the API call, if the API call will take more than
five seconds, at the time of the 6th second, I have to perform ...
0
votes
2
answers
228
views
How to I make sure a certain function gets executed after another in Angular?
I am currently trying to implement a membership portal in which when I submit a form, I want to post the member and immediately retrieve the value of the member from the ID number that is entered.
My ...
0
votes
3
answers
3k
views
The Mandatory 'grant_type' permission is missing when calling post request from Angular
I am getting this error when I am calling the api via Angular. However, when I call it via Postman, I am getting the desired response. I dont know what am I doing wrong. Below is the code that I have ...
0
votes
1
answer
2k
views
How to retrieve just one object from JSON file using TypeScript Angular?
I made a very normal HTTP request to get one object from a JSON file. but I noticed I get all the file's data instead of the only needed object.
following my code demonstrates how I made a class to ...
1
vote
1
answer
370
views
ngrx stagger load data with multiple HTTP request
I am working with an API in an Angular NGRX app that requires I make multiple calls to get all the data I'm looking for. For example, I start off by requesting a list of groups
GET http://api-path/my/...
1
vote
1
answer
847
views
Angular, Http Error blocks any further requests
After an error-response from the server my app does not send any further requests.
I'm sending a request with:
getMachineRules(rules: Array<string>): Observable<RulesResults> {
return ...
0
votes
1
answer
3k
views
Angular: How to use a Service to fetch data from server and store in an array?
I have a service which calls the PokéAPI at https://pokeapi.co/api/v2/pokemon/.
If you don't specify the Pokemon you want returned, the API will return a paginated list of resources, which contains ...
0
votes
0
answers
125
views
Unable to sent Header elements in a rest get call from Typescript
My Code is :-
accountBalance(response: any): Observable<any> {
const header = new HttpHeaders({'Authorization': "Bearer " + token,
'Content-Type': '...
1
vote
3
answers
5k
views
How to POST Blob with Angular 9?
I'm trying to send a blob to my server, but it wont work. I'm using the doctemplater library which creates a Blob. This blob is correct because I'm able to save to local file (with saveAs(...)). But ...
0
votes
2
answers
2k
views
Angular 8 Http Post get boolean value from subscribe
I've tried to get value out from subscribe of boolean true/false but i can't get value out, here is what i used so far.
My Old method for http post.
this.http.post(HostedPathConst.HostedPath + `...
0
votes
1
answer
2k
views
Unexpected token . in JSON at position 3 when making a POST HTTP Call in Angular
I'm attempting to parse a single string response to JSON, but I'm getting an error.
Unexpected token . in JSON at position 3
The string I'm trying to parse is simply
1.0.INDIVIDUAL
I thought that ...
1
vote
0
answers
155
views
Migrating from @angular/http to @angular/common/http but cant figure it out
Dumb question, but I have an application working on the old Angular-cli, that needs to be moved to the new cli, but after all my efforts, still can't get it to work. I am aware that the json parsing ...
0
votes
1
answer
777
views
how to delete particular record based on firebase json key
HtmlCode where data are display. Key is passed as a parameter
<div class="col-xs-12 col-md-6 col-md-offset-3" *ngIf="loadedPosts.length >= 1>
<ul class="list-group">
<li class=...
0
votes
2
answers
304
views
Fetch Data from two http get request from firebase and combine them in single array in angular and display it on page
I am working on angular app where I want to display my post which are coming from two different collection
i.e is Public and private. Now I am making two http request and I am getting data but I am ...
3
votes
3
answers
8k
views
angular post request with content-type application/json not working
I try to send post request with angular but when i set content-type to application/json
the request content-type always not set and the HTTP method always removed and all posted data removed from ...