I am trying to call a restfull service with a parameter . I am getting "failed to load resource: the server responded with a status of 500 (Internal Server Error)".
这是我在控制器中的代码:
getAvailableListFromService:function() {
var MemberId = 3;
var promise = $http.post(urlBase + '/' + 'getAvailableList',MemberId)
.success(function(data){
availableList = data;
return availableList ;
})
.error(function(data){
availableList = 'error';
return availableList ;
});
return promise;
}
getAvailableList是一个方法,memberId是一个请求参数。如何传递memberId参数和方法?
答案 0 :(得分:-1)