Angularjs 阻止对图像的进一步http调用
我遇到了以下问题,请帮我解决。在AngularJS应用程序中,我向“/abc”url发出$http.get请求。我收到的数据是html格式的。我应该解析html并从中获取有用的数据。现在的问题是,在原始url“/abc”中,有许多“文件夹”的图像 parseHTML函数将html转换为json数据。在控制台中,“hi”被打印出来,然后我得到--“GET 404(未找到)” 最后在parseHTML函数中,我创建了一个虚拟dom元素并对其进行解析Angularjs 阻止对图像的进一步http调用,angularjs,http,Angularjs,Http,我遇到了以下问题,请帮我解决。在AngularJS应用程序中,我向“/abc”url发出$http.get请求。我收到的数据是html格式的。我应该解析html并从中获取有用的数据。现在的问题是,在原始url“/abc”中,有许多“文件夹”的图像 parseHTML函数将html转换为json数据。在控制台中,“hi”被打印出来,然后我得到--“GET 404(未找到)” 最后在parseHTML函数中,我创建了一个虚拟dom元素并对其进行解析 var tempData = document.c
var tempData = document.createElement('html');
tempData.innerHTML = response;
var numberOfRows = tempData.getElementsByTagName("tr").length;
请发布您用$httptrued编写的代码,使用ng src?我不想显示html,我只想获取html并解析它。我想阻止对/icons/folder.gif的调用。请发布您使用$httptrying使用ng src编写的代码?我不想显示html,我只想获取html并解析它。我想阻止对/icons/folder.gif的调用
_commonModule.server.http($http, '/abc')
.success(function(response, status, headers, config) {
pageData = parseHTML(response);
console.log("hi");
})
.error(function(errResp) {
});
var tempData = document.createElement('html');
tempData.innerHTML = response;
var numberOfRows = tempData.getElementsByTagName("tr").length;