Struggling to find a solution for this.
I am trying to replace the innerHtml of an element with html that was generated from another library. Seems simple enough but not with Angular 2 of course. I am basically wrapping google-prettify-code script in an Angular 2 app directive.
in the component html that contains my prettify directive I want to add something like this.
<pre dg-prettify> <div class="foobar"> <div>Hello World</div> </div> </pre>
Then inside my prettify directive I need to take the innerHtml of the pre tag and pass it to the external library to be processed. I will get back a decoded html structure that then needs to be injected into the innerHtml of the pre tag replacing it’s original content .