angular.service vs angular.factory

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: Factory: the function (constructor) that you write will be invoked: What you do with that is up to you, but there are some useful patterns… Such as writing a service function to expose a public API: Or … Read more