In the previous chapter, I introduced services and explained how they are distributed using dependency injection. When using dependency injection, the objects that are used to resolve dependencies are created by service providers, known more commonly as providers. In this chapter, I explain how providers work, describe the different types of providers available, and demonstrate how providers can be created in different parts of the application to change the way that services behave. Table 18-1 puts providers in context.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Angular https://doi.org/10.1007/978-1-4842-8176-5_1818. Using Service Providers
Adam Freeman1
(1)
London, UK
Why You Should ...
Get Pro Angular: Build Powerful and Dynamic Web Apps 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.