1
我定义了以下服务:但是
MyManager.findById(contractId,
// on success
function (response) {
// do
},
// on error
function() {
alert("Error");
});
的:
myServices.factory('MyManager', ['$resource',
function ($resource) {
return $resource('../rest/contract/:contractId', {contractId:'@contractId'}, {
findById: {method: 'GET', contractId: '@contractId'}
});
}]);
我想使REST调用,并在我的控制,我这样做生成的URL是<base>/rest/contract
,并且没有附加路径变量。我传递给findById的参数不为null。
我在做什么错?