projects/maplander/shared/src/lib/pipes/safe-url/safe-url.pipe.ts
Name | safeUrl |
transform |
transform(value: any, args?: any)
|
Returns :
any
|
import {Pipe, PipeTransform} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
@Pipe({
name: 'safeUrl'
})
export class SafeUrlPipe implements PipeTransform {
constructor(
private _sanitizer: DomSanitizer
) {
}
transform(value: any, args?: any): any {
return this._sanitizer.bypassSecurityTrustResourceUrl(value);
}
}