【发布时间】:2016-02-29 21:09:26
【问题描述】:
我收到响应错误,请任何人尝试解决我的问题。我正在尝试解决这个问题,但我没有解决这个问题。请帮我。 提前谢谢
$scope.init = {};
var Call = $resource('../api/Home', {}, { query: { method: 'POST', isArray: false} });
$scope.init = function () {
//alert("hi");
$scope.selected = "";
var x = $('#txtSearch').val();
var _ReqObj = new Object();
_ReqObj.id = x;
_ReqObj.Meth = "GJ";
Call.query({}, _ReqObj,
function (response) {
alert(response);
alert(_ReqObj);
if (response == '') {
// alert('no data');
window.location.replace("index.html");
}
else {
//$scope.click = response;
$scope.init = response;
}
},
function (error) {
window.location.replace("index.html");
}
);
};
【问题讨论】:
-
你检查过这个链接了吗? docs.angularjs.org/error/$resource/…
-
能否请您更改问题的标题?错误链接没有帮助。您能否在浏览器的开发控制台中单击错误链接,然后从 angular-page 复制文本? :)
标签: angularjs angular-resource