angularjs - prevent further http calls to images -


i have encountered following problem, please me out. in angularjs app, making $http.get request '/abc' url. data receive in form of html. supposed parse html , useful data out of it. problem is, in original url '/abc', there many images of "folders".

<img src = "/icons/folder.gif" alt = [dir]"> 

i getting response in form of html, after enters success callback, additional requests being made 'currentpath/icons/folder.gif'. happening automatically. how prevent these requests?

code written in $http get

_commonmodule.server.http($http, '/abc')     .success(function(response, status, headers, config) {         pagedata = parsehtml(response);          console.log("hi");     })     .error(function(errresp) {     }); 

parsehtml function converts html json data. in console, "hi" getting printed , i'm getting --- "get http://unixdev:5678/icons/folder.gif 404 (not found)"

and in parsehtml function, creating dummy dom element , parsing it

var tempdata = document.createelement('html'); tempdata.innerhtml = response; var numberofrows = tempdata.getelementsbytagname("tr").length; 


Comments