aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngResource
diff options
context:
space:
mode:
authorIgor Minar2013-05-08 15:08:49 -0700
committerIgor Minar2013-05-08 15:08:49 -0700
commitee2689051bb40794eeb81baf80dc0717fd9edd2a (patch)
treeeed9b853ef64cb7d59555758bdf25ce8ce76207c /src/ngResource
parent5137a15417314a9c379909d7325feafb40243c34 (diff)
downloadangular.js-ee2689051bb40794eeb81baf80dc0717fd9edd2a.tar.bz2
refactor($resource): simplify url template expansion
Diffstat (limited to 'src/ngResource')
-rw-r--r--src/ngResource/resource.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index 05818271..3eb4e79e 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -19,7 +19,7 @@
* the need to interact with the low level {@link ng.$http $http} service.
*
* # Installation
- * To use $resource make sure you have included the `angular-resource.js` that comes in Angular
+ * To use $resource make sure you have included the `angular-resource.js` that comes in Angular
* package. You can also find this file on Google CDN, bower as well as at
* {@link http://code.angularjs.org/ code.angularjs.org}.
*
@@ -317,7 +317,7 @@ angular.module('ngResource', ['ng']).
}
function Route(template, defaults) {
- this.template = template = template + '#';
+ this.template = template;
this.defaults = defaults || {};
this.urlParams = {};
}
@@ -355,8 +355,8 @@ angular.module('ngResource', ['ng']).
}
});
- // set the url
- config.url = url.replace(/\/?#$/, '').replace(/\/*$/, '');
+ // strip trailing slashes and set the url
+ config.url = url.replace(/\/+$/, '');
// set params - delegate param encoding to $http
forEach(params, function(value, key){