I have theHtmlString variable and bind as follow is correct:
<div [innerHTML]="theHtmlString">
</div>
But theHtmlString variable has contain some orther variable:
theHtmlString = "<input [(ngModel)]='value'/>";
How bind HTML for it?
I have theHtmlString variable and bind as follow is correct:
<div [innerHTML]="theHtmlString">
</div>
But theHtmlString variable has contain some orther variable:
theHtmlString = "<input [(ngModel)]='value'/>";
How bind HTML for it?
Angular doesn't process HTML added this way. It doesn't resolve bindings nor instantiate components or directives. It's passed to the browser as-is.
You could use something like that in the template:
<div [innerHTML]="value + 'abc ...'">
</div>
Otherwise you can use curly brackets this way into your expression...