I'm learning AngularJS and I'm seeing the term "service" used in three different places in the developer guide, and it's confusing me just a little bit.
A. In the Angular developer guide, there's a section on services. It goes on to describe how to declare these using myModule.factory
.
B. In the Angular developer guide, there's a section on providers, which says that the injector service "creates two types of objects, services and specialized objects." It gos on to describe the 5 recipes for services, one of which is:
So it seems like A is an entire section redundantly covering C, which is already part of B, which describes a service as being one possible type of service.
I am confused. Why is a Service a type of service? Is this just poorly chosen terminology combined with redundant docs? Why does the Service section (A) cover creating services with angular.factory
, which is one of the other 5 "types of service", alongside Service?