Not able to set [innerHTML] of a html element

Here is the HTML element:

<td [innerHTML]="options">

And here is the typescript:

 this.options = "<button class='btn btn-success' (click)='addToCart(item)'> Add to cart </button>";

This could not able to set the innerHTML of element to tag just setting it to the string Add to cart.
How can I set it to a HTML element?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.