Answers for "angular innerhtml style"

1

angular innerhtml style not working

import { DomSanitizer } from '@angular/platform-browser'
import { PipeTransform, Pipe } from "@angular/core";

@Pipe({ name: 'safeHtml'})
export class SafeHtmlPipe implements PipeTransform  {
  constructor(private sanitized: DomSanitizer) {}
  transform(value) {
    return this.sanitized.bypassSecurityTrustHtml(value);
  }
}

...

<div [innerHtml]="html | safeHtml"></div>
Posted by: Guest on December-30-2020
0

angular innerhtml style

import { ViewEncapsulation } from '@angular/core'

encapsulation: ViewEncapsulation.None
Posted by: Guest on April-16-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language