AngularJS : When To Use Service Instead Of Factory
Answer : Explanation You got different things here: First: If you use a service you will get the instance of a function (" this " keyword). If you use a factory you will get the value that is returned by invoking the function reference (the return statement in factory). ref: angular.service vs angular.factory Second: Keep in mind all providers in AngularJS (value, constant, services, factories) are singletons! Third: Using one or the other (service or factory) is about code style. But, the common way in AngularJS is to use factory . Why ? Because "The factory method is the most common way of getting objects into AngularJS dependency injection system. It is very flexible and can contain sophisticated creation logic. Since factories are regular functions, we can also take advantage of a new lexical scope to simulate "private" variables. This is very useful as we can hide implementation details of a given service." ( ...