In most examples, I find using services in angularJs. I find that the service is really a factory. eg,
angular.module('myModule').factory('customerService', [ '$http', function ($http) { return { get: function () { return doSomeStuff(); } }; } ]);
The author created a factory, but named it customerService instead of customerFactory. Why is this? Is there any kind of stigma about the factories or the angular services are so super-cool that everyone wants to get recognition for them, even if they donβt.
Also, to be understood by anyone who answers this, I am not asking for the comparative merits of factories or services, which I ask why the angular community is deliberately misusing its objects.
source share