Member-only story
Step by Step Guide on How to make API Call in Angular (ES6 Promise)
This post documented down how to make APIs call to the backend server in order to display the data in your Angular App.
Making API Call using HttpClient
Angular Framework provides a module named HttpClientModule
which allows you to perform the Http Call to the backend server and retrieve data. We will discuss the step-by-step guide to make an API call in the next section.
Step by Step Guide to Make an API call
Step 1: Import the HttpClientModule
into your AppModule
.
Angular Framework introduces Service
which is where you should perform your API call and write your HttpClient code which we will do in Step 2.