Hi Charles,
Ah, I see, well, do do that, you need to process your content's HTML and
fetch only what you need from there.
something like this:
function AppController($http, $sce) {
var vm = this;
vm.version = angular.version.full +" "+ angular.version.codeName;
$http.get("content.html").then(function (response) {
var html = response.data
var holder = document.createElement("div")
holder.innerHTML = html
var img = holder.getElementsByTagName('img')[0]
var par = holder.getElementsByTagName('p')[0]
vm.html = $sce.trustAsHtml(img.outerHTML + par.outerHTML);
});
}
Oh, don't do this in a controller, you should wrap it up in a directive of
service. I just wrote you a sample to show you how you can get what you
want..
Does that help a bit?
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.