

In this exercise we will demystify the Angular Service by taking a simple pragmatic approach to implementing a service that retrieves a JSON file from the server using the HttpClientModule.
The notion of Services is that of a “Design Pattern”.
At the end of the day a Service is nothing more than a class.
What makes it fancy is combining it with Dependency Injection (DI) which handles instantiation & construction for us.
Meaning that they will only be instantiated once within the current context.
By injecting a Service in multiple locations such as a parent & child component you can effectively share the state of objects.





