When an angular controller needs to invoke some logic, like perhaps calling a web API, that logic can be encapsulated in an angular service or factory. (There are other options, but that's not important for the difference between a service and a factory.)
I just did some googling and there are a ton of articles and videos out there that explain what services and factories are. These articles and videos don't explain which one to use and why. So if I'm writing code in my angular controller and I want to use a factory or service, which one should I use and why?
I don't care about how they work, that at least one of them is a singleton, that one returns and instance of a function, one is used with the new keyword, blah...
Both services and factories appear to be used and called in the same way. So can someone explain in which case I would use one over the other and why? Does it even matter?
** Edit **
The suggested possible answer states this:
You can accomplish the same thing with both. However, in some cases the factory gives you a little bit more flexibility to create an injectable with a simpler syntax. That's because while myInjectedService must always be an object, myInjectedFactory can be an object, a function reference, or any value at all.
If that's it, then my question is indeed answered. But it would be nice to know if that's the case. Is that the only reason to use a factory over a service?