angular.service vs angular.factory
angular.service(‘myService’, myServiceFunction); angular.factory(‘myFactory’, myFactoryFunction); I had trouble wrapping my head around this concept until I put it to myself this way: Service: the function that you write will be new-ed: myInjectedService <—- new myServiceFunction() Factory: the function (constructor) that you write will be invoked: myInjectedFactory <— myFactoryFunction() What you do with that is up to … Read more