gpt4 book ai didi

javascript - Angular JS : Uncaught DOMException: Failed to execute 'removeChild' on 'Node' on HTMLScriptElement. 回调

转载 作者:数据小太阳 更新时间:2023-10-29 03:54:50 25 4
gpt4 key购买 nike

我正在使用 Angular JSON Http 调用。同样,当我发出这样的帖子请求时:

app.service('AjaxService', [ '$http','$q','$sce', function($http,$q,$sce) {
return {
getSearchResultsJSONP : function() {
var url="http://stage-sp1004e4db.guided.lon5.atomz.com/?searchType=globalsearch&q=this&sp_staged=1&callback=JSON_CALLBACK";
$sce.trustAsResourceUrl(url);
$http.jsonp(url)
.success(function(data) {
console.log("Data for default SNP call" ,data);
}).
error(function (data) {
console.log("request Failed ! ");
});
},
getSearchResult : function(searchText,url){
var defer = $q.defer();
$http({
url: url,
method: "GET",
params: {searchresInput: searchText}
}).then(function(data, status, header, config){
defer.resolve(data);

}).then(function(data, status, header, config){
defer.reject(data);

});
return defer.promise;
}
};

}]);

我可以看到网络中的数据,响应为 200 OK 状态。

但是我在完整代码运行期间遇到错误:

Uncaught TypeError: Cannot read property 'parentElement' of undefined
at checklistFunc (masterlowerlibs.67785a6….js:42972)
checklistFunc @ masterlowerlibs.67785a6….js:42972

有人可以帮我解决这个问题吗?或者哪里出了问题?

我的回复是这样的:

angular.callbacks._0({metadata: {,…}, pagination: {totalpages: "1", firstpage: "", pagelinks: {pagelink: [,…]}},…})
facets
:
[{}, {}, {}, {}, {}, {}, {}, {}]
metadata
:
{,…}
pagination
:
{totalpages: "1", firstpage: "", pagelinks: {pagelink: [,…]}}
results
:
[,…]
sort
:
[{selected: true, name: "default", value: "relevance"}, {name: "Latest", value: "tkh_pageDate"}]

最佳答案

如果您点击错误代码行,我假设您得到的是精简/混淆代码,因此我建议您使用适用于 Chrome 浏览器的 AngularJS Batarang 插件进行安装和调试。

我希望这有助于理解错误发生的原因。

关于javascript - Angular JS : Uncaught DOMException: Failed to execute 'removeChild' on 'Node' on HTMLScriptElement. 回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41931159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com