Question: what is difference between service and factory?
Answer: Most important is to realize that both are singletons in your app, even though the name “factory” might imply differently. Essentially, factories are functions that return the object, while services are constructor functions of the object which are instantiated with the new keyword.