I am using [innerHTML] binding to get some HTML content into a div, with a sanitizing pipe as described here.
I also need to be able to update the styles dynamically based on user input (font size, for example). I have been using [ngStyle] for other elements, but [ngStyle] does not seem to play well with [innerHTML]. The user can update the fontSizeVar, and the correct CSS can be found in the browser inspector, but the size of the [innerHTML] bound content never changes. Thoughts?
Template:
<div class='content'
[ngStyle]='{ "font-size": fontSizeVar }'
[innerHTML]='description | safeHtml'>
</div>