File

projects/maplander/shared/src/lib/pipes/safe-url/safe-url.pipe.ts

Metadata

Name safeUrl

Methods

transform
transform(value: any, args?: any)
Parameters :
Name Type Optional
value any No
args any Yes
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);
  }

}

result-matching ""

    No results matching ""