Skip to main content

Using Service Providers

  • Chapter
  • First Online:
Pro Angular 6
  • 2403 Accesses

Abstract

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 provider available, and demonstrate how providers can be created in different parts of the application to change the way that services behave. Table 20-1 puts providers in context.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Adam Freeman

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Freeman, A. (2018). Using Service Providers. In: Pro Angular 6. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3649-9_20

Download citation

Publish with us

Policies and ethics