<div [innerHtml]="someHtml | safeHtml"></div>
someHtml = '<span class="fas fa-calendar" style="font-size:15px"></span>'
I inject a html element through innerHtml
property and I could apply some inline-style by binding DomSanitizer
pipe. But I wonder if there's any other ways to apply styles through class
other than inline-style with DomSanitizer
. After some research, I could make it work with ::ng-deep
but it seems deprecated according to the docs. Any insight would be appreciated!