April 2018
Intermediate
110 pages
2h 12m
English
In this section, we will use ng generate to create the PostsService, use environment to store the API URL, and use the PostsService in our components. We will then define our API calls in the PostsService and leverage the HttpClientModule to enable HTTP access.
We will use the ng generate service command to generate a service that will handle the interaction with our API:
ng g s posts/services/posts --module posts/posts

We will use the environment of Angular ...
Read now
Unlock full access