aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngResource/resource.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js
index 81b57f43..484e9b01 100644
--- a/src/ngResource/resource.js
+++ b/src/ngResource/resource.js
@@ -308,7 +308,7 @@ angular.module('ngResource', ['ng']).
this.defaults = defaults || {};
var urlParams = this.urlParams = {};
forEach(template.split(/\W/), function(param){
- if (param && template.match(new RegExp("[^\\\\]:" + param + "\\W"))) {
+ if (param && (new RegExp("(^|[^\\\\]):" + param + "\\W").test(template))) {
urlParams[param] = true;
}
});