diff options
| author | Misko Hevery | 2010-07-22 11:18:32 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-07-22 11:18:32 -0700 | 
| commit | 849a05b5a578f19ddc3d24dc9fbd304e0e07612a (patch) | |
| tree | 3e32e2ab7b8c1ed3f53e5b568990070b5edab4fa /src/Resource.js | |
| parent | b5bbfaeb80c3f89c65d14c72cff6f0e1c8aa497a (diff) | |
| download | angular.js-849a05b5a578f19ddc3d24dc9fbd304e0e07612a.tar.bz2 | |
added jsonp to resources
Diffstat (limited to 'src/Resource.js')
| -rw-r--r-- | src/Resource.js | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Resource.js b/src/Resource.js index 1279dc54..f4f26ebd 100644 --- a/src/Resource.js +++ b/src/Resource.js @@ -28,6 +28,7 @@ Route.prototype = {          query.push(encodeURI(key) + '=' + encodeURI(value));        }      }); +    url = url.replace(/\/*$/, '');      return url + (query.length ? '?' + query.join('&') : '');    }  }; @@ -88,7 +89,7 @@ ResourceFactory.prototype = {            throw "Expected between 0-3 arguments [params, data, callback], got " + arguments.length + " arguments.";          } -        var value = action.isArray ? [] : new Resource(data) +        var value = action.isArray ? [] : new Resource(data);          self.xhr(            action.method,            route.url(extend({}, action.params || {}, extractParams(data), params)),  | 
