What’s the difference between Angular.js “factory” and “service”?

The “service” works much the same as the “factory” one.

The difference is simple: The “factory” receives a function that gets called when we create it and the “service” receives a constructor function where we do a new on it (actually internally is uses object.create instead of new).

One Comment

Leave a Reply