One of the most clearest examples I read about services/factories/providers was that they corresponded to: A car, a factory that gives you cars(e.g. red car, blue car), and a configurable factory that outputs cars(e.g. high-quality cars, low-quality cars)
The part that is confusing me though is the "everything is a singleton" explanation. From the above example I had assumed that a "service" was a singleton that returned itself, and that the factory and provider were singletons that returned objects(each one unique). That is, if one controller got a blue car, and the other a red car, they would be two separate cars.
I think though the confusion comes from factories being written in two different ways. In one way, you return an object. This makes it functionally equivalent to a "service". In the other way, you return a function which is an instantiable object so that anything using this factory can get new separate instances.
Is this correct? Of the two methods of writing a factory is any one of them an anti-pattern?