我得到响应错误请任何一个试图解决我的问题。我正试图解决这个问题,但我没有解决这个问题。请帮帮我。 由于事先查询:响应不匹配,配置参数
$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");
}
);
};
你检查这个环节? https://docs.angularjs.org/error/$resource/badcfg?p0=query&p1=object&p2=array&p3=POST&p4=..Fapi%2FHome –
你能否改变问题的标题?错误链接不起作用。你能点击浏览器中你的开发控制台中的错误链接,然后从角度页面复制文本吗? :) –