|
@@ -1,17 +1,14 @@
|
|
|
/*
|
|
|
There are 5 types of services:
|
|
|
|
|
|
-* Most popular:
|
|
|
- * Factory: used to share functions and objects across an app.
|
|
|
- * Provider: like factory, but with configuration
|
|
|
-* Others:
|
|
|
- * Constant
|
|
|
- * Service
|
|
|
- * Value
|
|
|
+* Factory: most common. Used to share functions and objects across an app.
|
|
|
+* Value: often used, just share a value
|
|
|
+* Provider: common. Like factory, but with configuration
|
|
|
+* Constant: rarely used, to share a value within app configuration.
|
|
|
+* Service: rarely used, a ServiceService recipe (?) to share instances of methods and objects.
|
|
|
|
|
|
*/
|
|
|
|
|
|
-
|
|
|
angular.module("noteWrangler")
|
|
|
// Naming the function <service>Factory is a common convention.
|
|
|
.factory('Note', ['$http', function NoteFactory($http) {
|