I am confused about something regarding factories and services for Angular.js.
In this question:
angular.service vs angular.factory
It says that services are created with the new
keyword.
While in this question:
Confused about Service vs Factory
It says that services are "singletons".
My questions are:
When you add a 'service' as a dependency injection argument to another module, does Angular create a new service each time? Or is it really singleton (as in one will be created, and then provide that specific instance everywhere)?