Within my controller:
UserResource.find({ userId: userId }, function (records) {
$scope.user= records;
});
In the resource I've created:
angular.module("main_k").
factory("main_k.service.resource.Order", ["$resource", function ($resource) {
return $resource("../rest/user/:action?:identification", {
action: "@userId",
identification: "identification51854"
}, { find: { method: "GET"}
});
}]);
The challenge being faced is that the userId ends up being appended to the url instead of being properly inserted into the 'action' parameter. The 'identification' parameter, however, works correctly. I'm puzzled about how to properly pass the value of userId.