I defined the following service:
myServices.factory('MyManager', ['$resource',
function ($resource) {
return $resource('../rest/contract/:contractId', {contractId:'@contractId'}, {
findById: {method: 'GET', contractId: '@contractId'}
});
}]);
I want to make the REST call and, in my controller, I am doing this:
MyManager.findById(contractId,
// on success
function (response) {
// do
},
// on error
function () {
alert("Error");
});
However, the generated URL is <base>/rest/contract and no path variable is appended. The parameter I am passing to findById is not null.
What am I doing wrong?