Project

General

Profile

1 61381 k.triantaf
import { Pipe, PipeTransform} from '@angular/core'
2
3
import { DomSanitizer, SafeUrl } from '@angular/platform-browser'
4
5
@Pipe({ name: 'safeHtml'})
6
export class SafeHtmlPipe implements PipeTransform  {
7
  constructor(private sanitized: DomSanitizer) {}
8
9
  transform(value):SafeUrl {
10
    return this.sanitized.bypassSecurityTrustHtml(value.replace(/ /g,''));
11
  }
12
}