angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

Action's params should override resource's default params

Open tleruitte opened this issue 15 years ago • 1 comments

Let's consider the following service:

angular.service('Bookmarks', function($resource) { return $resource('/api/bookmarks', { limit: 2 }, { get: {method: 'GET', params:{limit:3}} } ); });

The call Bookmarks.get() should be issued with the param 'limit' set to 3, since it has been overridden in the action definition. For now, this param is set to the default value (i.e. 2).

tleruitte avatar Sep 12 '11 10:09 tleruitte

It was fixed in 1.0.3 and works fine now: http://jsfiddle.net/BJGCb/4/ Closing.

pkozlowski-opensource avatar Dec 02 '12 09:12 pkozlowski-opensource