-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject HTML #35
Comments
There's no support for setting HTML directly in Incremental DOM or superviews.js.
This will compile to:
|
Thanks! I'll give it a try. |
@davidjamesstone I gave it a try. It compiled as you indicated. I have the data there and the element but calling el.innerHTML = data doesn't do anything. Any suggestions? |
Adding skip to the element was the problem. I changed to this and it works: <div>
<script>
if (ctrl.html && ctrl.html !== '') {
var el = currentElement();
el.innerHTML = ctrl.html;
}
skip();
</script>
</div> I got the idea for doing it this way from google/incremental-dom#283 |
This is kind of related to 34.
I'm looking for a way to inject safe HTML into an element, like:
angular 1:
angular 2: <div [innerHTML]="theHtmlString">
The text was updated successfully, but these errors were encountered: