Hi,
Can you tell me how to call the existing API call in angular and get the details.
Thanks
Sathish
Hi,
Can you tell me how to call the existing API call in angular and get the details.
Thanks
Sathish
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Mar 6, 2023, 8:32 AM
Check the below links
https://www.knowledgehut.com/blog/web-development/make-api-calls-angular
https://medium.com/bb-tutorials-and-thoughts/how-to-make-api-calls-in-angular-applications-ab5364cf9533
https://dzone.com/articles/how-to-make-a-rest-api-call-in-angular
Vishal YelvePosted Mar 6, 2023, 7:09 AM
Hi Sathish,
Please refer my article on Angular CRUD
https://www.c-sharpcorner.com/article/angular-crud-using-net-core-web-api/
Tuhin PaulPosted Mar 3, 2023, 11:00 PM
Code to make an API call in Angular
1. First, import the HttpClientModule module in your Angular module. This module provides the HttpClient service, which you'll use to make the API call.
2. Next, create a service to handle the API call. In this example, we'll create a MyService service with a getDetails method that makes an API call to retrieve some data.
This service injects the HttpClient service and defines an apiUrl property that contains the URL of the API you want to call. The getDetails method makes a GET request to the API and returns an Observable that emits the data returned by the API.3. You can call the getDetails method from a component or another service to retrieve the data.
In this example, we inject the MyService service into the MyComponent component and call its getDetails method in the ngOnInit lifecycle hook. When the API call returns data, we set the details property of the component to the returned data and use an ngFor directive to display it in a list. This is just a basic example to get you started.
Raj KumarPosted Mar 3, 2023, 6:50 PM
Refer this step by step article, easy to understand and detailed explanation:
https://www.c-sharpcorner.com/article/crud-operation-in-angular-7-using-web-api/
Sachin SinghPosted Mar 3, 2023, 6:06 PM
follow this article
https://medium.com/codex/angular-crud-with-net-core-web-api-ad24a6f7ee3c
Naimish MakwanaPosted Mar 3, 2023, 3:55 PM
Hello Sathish,
Refere below links:
https://www.itsolutionstuff.com/post/angular-get-data-from-api-and-display-exampleexample.html
https://levelup.gitconnected.com/angular-tutorial-part-ii-application-8c30566e7c5d
Thanks
Naimish Makwana