I need to clean span elements out of an HTML include, going by this example. However it just returns the first plain text string in the include and drops everything else (the include has over a dozen href links that I want to preserve).
$scope.footermenu = function () {
$http.get('includes/mainmenu.html').success(function(data) {
var menusrc = data;
$(menusrc).find('span').remove();
var nospans = $(menusrc).html();
return nospans;
});
};
});