import { Pipe , PipeTransform } from '@angular/core' ; import { DomSanitizer } from '@angular/platform-browser' ; @ Pipe ( { name : 'safe' , } ) export class SafeHtmlPipe implements PipeTransform { constructor ( protected sanitizer ) { } transform ( htmlString ) { return this . sanitizer . bypassSecurityTrustHtml ( htmlString ) ; } }