angular escape style attr

Solutions on MaxInterview for angular escape style attr by the best coders in the world

showing results for - "angular escape style attr"
Leana
09 Nov 2016
1import { DomSanitizer } from '@angular/platform-browser'
2import { PipeTransform, Pipe } from "@angular/core";
3
4@Pipe({ name: 'safeHtml'})
5export class SafeHtmlPipe implements PipeTransform  {
6  constructor(private sanitized: DomSanitizer) {}
7  transform(value) {
8    return this.sanitized.bypassSecurityTrustHtml(value);
9  }
10}
11