In the AngularJS documentation, there is an explanation of the differences between a factory, a service, a value, a constant and a provider .
At the end, we have a compa
Type here refers to:
- primitives,
- object literals,
- functions, or
- even an instance of a custom type
Factories and Providers are most flexible out of the Service, Constant, Value in terms of what they bind to the injector. Hence Angular can detect the type of object/primitive that is bound to Service, Constant, Value hence friendlier since we know the type upfront (design/build time).