Files
FarmMapsLib/projects/common/src/fm/shared/safe.pipe.ts
Willem Dantuma cec43a636c
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
Renamed prefixes in angular.json
2019-11-04 13:43:46 +01:00

14 lines
327 B
TypeScript

import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
@Pipe({
name: 'safe'
})
export class SafePipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) { }
transform(url) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}