5 Must Reads to understand AngularJS Service and Factory difference
As a beginner or intermediate, a lot of JavaScript developers tend to get confused between the two most vital components of AngularJS - Service and Factory.
Reason, both tend to do a kind of similar job, well it looks like initially when we can't really distinguish the proper usage. I too had these confusions and a few of my colleagues happened to ask me this particular question often and often. So here I am, compiled the list of very good writings - this will give you a perfect answer on what are AngularJS Service or Factory, how to use them, what are the differences etc.
- Answer by Doug T on StackExchange
- Usage example by Gil
- A StackExchange Community Wiki
- AngularJS: Factory vs Service vs Provider by Tyler (He has got a cool website, check that out)
- AngularJS Service vs Factory - video by DevelopMentor
I hope, after going through those Q/As and the video if you were still in doubt - you have a clear picture of what Service and Factory are made for in AngularJS.