How to use it

The first thing that catches our eye is that we're using the HttpClient class within the constructor; we only got the quizzes property to store its results. As a matter of fact, we don't even instantiate it within our code, we just have an HTTP parameter to the constructor and take it for granted, as if there was some guy who would instantiate it for us.

As a matter of fact, it is just like that, but the guy is Angular itself, or--to better say it--its very own Dependency Injection framework.

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.