---
title: 'AngularJS Service and Factory: 5 Must Reads'
description: >-
  These are five best readings to understand what are the crucial differences between AngularJS
  service and factory.
url: https://expiredqueues.com/service-and-factory/
date: '2015-06-24T19:21:41.000Z'
image: https://expiredqueues.com/images/og/service-and-factory-867d2e5c.jpg
---

Written in June 2015. Much of what it describes has since changed or disappeared; it is kept as a record of how the web used to work, not as advice.

AngularJS posts javascript

# 5 Must Reads to understand AngularJS Service and Factory difference

24 June 2015 By Adrian 1 min read

As a beginner or intermediate, a lot of [JavaScript](https://expiredqueues.com/) 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](https://expiredqueues.com/) Service or Factory, how to use them, what are the differences etc.

1. [Answer by Doug T on StackExchange](https://softwareengineering.stackexchange.com/questions/252288/angularjs-directive-vs-service-vs-controller/252291#252291)
2. [Usage example by Gil](https://stackoverflow.com/questions/14324451/angular-service-vs-angular-factory/21900284#21900284)
3. [A StackExchange Community Wiki ](https://stackoverflow.com/questions/15666048/angularjs-service-vs-provider-vs-factory/15666049#15666049)
4. [AngularJS: Factory vs Service vs Provider](https://stackoverflow.com/questions/15666048/angularjs-service-vs-provider-vs-factory/23683176#23683176) by [Tyler](http://tylermcginnis.com) _(He has got a cool website, check that out)_
5. [AngularJS Service vs Factory](https://www.youtube.com/watch?v=0ybzZ3zZus0) - video by [DevelopMentor](https://twitter.com/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.

### Similar posts

- [Context Menu using AngularJS Directive](https://expiredqueues.com/custom-context-menu-directive/)

[Previously Context Menu using AngularJS Directive](https://expiredqueues.com/custom-context-menu-directive/) [Next Fix iTerm2 word navigation on macOS](https://expiredqueues.com/iterm2-mac-natural-text/)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "5 Must Reads to understand AngularJS Service and Factory difference",
  "datePublished": "2015-06-24T19:21:41.000Z",
  "dateModified": "2015-06-24T19:21:41.000Z",
  "author": {
    "@type": "Person",
    "name": "Adrian",
    "url": "https://expiredqueues.com/about/"
  },
  "publisher": {
    "@type": "Person",
    "name": "Adrian"
  },
  "mainEntityOfPage": "https://expiredqueues.com/service-and-factory/",
  "keywords": "posts, javascript, mvc, resources, web-development",
  "articleSection": "AngularJS"
}
```
