From e626f95469299ce172a7b86753b10c41dcb91e48 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Sun, 6 Feb 2011 22:26:09 -0800
Subject: $resource service docs
---
src/services.js | 130 ++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 89 insertions(+), 41 deletions(-)
(limited to 'src')
diff --git a/src/services.js b/src/services.js
index a02f0e5e..8dad15dc 100644
--- a/src/services.js
+++ b/src/services.js
@@ -1151,16 +1151,94 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $log){
/**
* @workInProgress
- * @ngdoc function
+ * @ngdoc service
* @name angular.service.$resource
- * @requires $xhr
+ * @requires $xhr.cache
*
* @description
- * Is a factory which creates a resource object which lets you interact with
- * RESTful
- * server-side data sources.
- * Resource object has action methods which provide high-level behaviors without
- * the need to interact with the low level $xhr or XMLHttpRequest().
+ * Is a factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link angular.service.$xhr $xhr} service or
+ * raw XMLHttpRequest.
+ *
+ * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
+ * `/user/:username`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ * `actions` methods.
+ *
+ * Each key value in the parameter object is first bound to url template if present and then any
+ * excess keys are appended to the url search query after the `?`.
+ *
+ * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ * URL `/path/greet?salutation=Hello`.
+ *
+ * If the parameter value is prefixed with `@` then the value of that parameter is extracted from
+ * the data object (useful for non-GET operations).
+ *
+ * @param {Object.