I am storing the HTML in a string and using it in the HTML file, I have used the HTML sanitize pipe.
below is my string
privacyNotice = "<div style=\"color: #ff0000;font-style: italic;\">Before continuing to the Application, you are required to read and acknowledge this Privacy Notice</div>......<div><input type=\"checkbox\" (change)=\"changeAcknowledgeBtnState()\"/><span class=\"pl-5\">I acknowledge terms of the privacy notice</span> </div> <div> <button class=\"ackBtn\" [disabled]=\"disableButton\" (click)=\"changePrivacyNoticeStatus()\">Acknowledge </button> </div>";
below is the html file code
<div class="container" [innerHTML]='privacyNotice | safeHtml'>
I have used the safeHtml pipe by referring this example
the disabled attribute to the button is not working and also changePrivacyNoticeStatus() is also not getting called