Difference Between Service And Factory
13 October 2013
Set up Angular Application
Service and Factory are both the function the provide inject-able object into Angular Module, the difference is subtle
Basicly the difference is
- for service, it return the instance of the function, the function it define is actually an object constructor
- for factory, it return the result of the function, it return the object
reference:
http://slides.wesalvaro.com/20121113/#/
http://stackoverflow.com/questions/13762228/confused-about-service-vs-factory
blog comments powered by Disqus