aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Syrjälä2012-12-07 20:09:42 +0200
committerPawel Kozlowski2012-12-09 17:49:42 +0100
commit0a61dcb486c4a97c1f9ff4f669faaa857fa626bd (patch)
tree1f3a328a36dd235be8d1e02398481da75f6c351b
parent4b51eaadf830240e7226d4362c93fc48e09c8a95 (diff)
downloadangular.js-0a61dcb486c4a97c1f9ff4f669faaa857fa626bd.tar.bz2
docs($resource): document port number escaping and fix typo
-rw-r--r--src/ngResource/resource.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index e3578249..6dfad572 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -19,7 +19,9 @@
* the need to interact with the low level {@link ng.$http $http} service.
*
* @param {string} url A parameterized URL template with parameters prefixed by `:` as in
- * `/user/:username`.
+ * `/user/:username`. If you are using a URL with a port number (e.g.
+ * `http://example.com:8080/api`), you'll need to escape the colon character before the port
+ * number, like this: `$resource('http://example.com\\:8080/api')`.
*
* @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
* `actions` methods.
@@ -225,7 +227,7 @@ angular.module('ngResource', ['ng']).
};
/**
- * We need our custom mehtod because encodeURIComponent is too aggressive and doesn't follow
+ * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
* segments:
* segment = *pchar