angular/angular.js — pull request #1113 by lascap (2012-07-04 08:11:33+00:00)
Title: Dynamic default params for $resource

As discussed in an email thread, here is a pull request to get dynamic default parameters for $resource so it's possible to do:

var User = $resource('/user', {'group': function() { return $location.search().group; }});

....
//modify group in $location
....

// the group is fetched only when I request for the user
user = User.get({'userId': myId}, function() { .... });