### File

`projects/app-base-library/src/lib/angular/pipes/trust-as-url.pipe.ts`

### Metadata

name | trustAsUrl

### Methods

transform
`transform(value: )`
Defined in projects/app-base-library/src/lib/angular/pipes/trust-as-url.pipe.ts:12

Parameters :

Name | Optional
value | no

Returns : `any`

    import {PipeTransform, Pipe} from '@angular/core';
    import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';

    @Pipe({
        name: 'trustAsUrl'
    })
    export class TrustAsUrlPipe implements PipeTransform {

        constructor(private _sanitizer: DomSanitizer) {
        }

        transform(value) {
            if (!value) {
                return value;
            }
            const url: SafeResourceUrl = this._sanitizer.bypassSecurityTrustResourceUrl(value);
            return url;
        }

    }

# results matching ""

# No results matching ""