I am returning a bunch of trusted html from a service and then in a ng-repeat
I want to loop through the HTML and display it so I am using ng-bind-html="item.myHTML"
but if the HTML has <style>
applied on it then this style is applied to the whole page, how can I have this style only be applied to the HTML that is in my ng-bind-html
?
Here is what some of the HTML I get form my service might look like
<html>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
<p>test text</p>
<html>
But then all h1 tags on the page have color maroon, but I dont want that, just the embed html to have that style.
Thank you