boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

How to solve sanitizing URL problem in Angular?

Updated on     Kisan Patel

Lets learn how to solve sanitizing URL problem in Angular using pipes.

First create SafeUrl pipes by running below command using angular cli:

$ ng g p SafeUrl

safe-url.pipe.ts

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(url) {
      return this.sanitizer.bypassSecurityTrustResourceUrl(url);
   }
}

Now, use it as the following:

<iframe [src]="url | safeUrl" frameborder="0" allowfullscreen></iframe>

Angular

Leave a Reply