Fetching Data Through HTTP
Learn to use HttpClientModule to fetch live data from the Fake Store API.
We'll cover the following
The product list component uses the products
service to fetch and display product data. The data is currently hardcoded into the products
property of the ProductsService
class.
Setting up HTTP client and API integration
We will modify our Angular application to work with live data from the Fake Store API:
Open the
app.module.ts
file and import the Angular module of the HTTP client:
Get hands-on with 1400+ tech skills courses.