Services play a vital role in any Angular application. We may design our own Angular services by taking full advantage of the many built-in services in Angular. In this chapter, we will discuss how to do both, so that you have an idea of how to create as well as manage Angular services.
In this chapter, we will cover the following topics:
- Why use a service or factory?
- Creating a service
- Accessing data from components using service
- Creating an asynchronous service