Challenge: Displaying Data from a REST API
Explore how to fetch and display data from a REST API using Angular services, HttpClient, and dependency injection. This lesson guides you through generating a service, injecting HttpClientModule, and presenting retrieved data in an Angular template.
Challenge description
In this challenge, we’ll use HttpClientModule, Providers, and dependency injection in Angular. We’ll follow the steps below:
Step 1: Generate a new service
First, we’ll start with generating a new service file called user. Inside this file, we use the GET request in ...