I'm currently developing a new AngularJS application and I'm in need of something similar to JSOUP functionality but for AngularJS.
My Questions:
- How can I retrieve the HTML code of an external website?
- Is there a way to split the HTML elements (i.e. div, span etc.)?
I attempted to use $http.get in my app.js:
$scope.test = function(){
$http.get("https://www.civiweb.com/FR/offre/71087.aspx").success(function(data){
$scope.test = data;
})
.error(function(data){
console.log("Error getting HTML : "+data);
});
}
In my index.html
<div>{{test}}</div>
Unfortunately, this approach is not working as expected.
I'd appreciate any help or guidance you can provide. Thank you!