title: angular add unsafe before url in href - sanitizing unsafe URL
body: <p>I am trying to open an app. Its working fine when I give a static URL. But as I create a dynamic href tag in *ngFor I can see unsafe keyword is added before the URL and it's not working.</p>
  
  <p>I am running on Angular 6. And getting the Id in a service. In ngFor I am looping the result and creating a link with Id to open the app. I create a pipe but it's still not working.</p>
  
  <p><strong>Safe Pipe</strong></p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  import { DomSanitizer } from '@angular/platform-browser';
  
  @Pipe({
    name: 'safeurl'
  })
  export class SafeurlPipe implements PipeTransform {
  
    constructor(private domSanitizer: DomSanitizer) {}
    transform(value: any) {
      return this.domSanitizer.bypassSecurityTrustUrl(value);
    }
  
  }
  </code></pre>
  
  <p>In the component I added the below line between ngFor tag</p>
  
  <pre><code>&lt;a href="appName://joinTournament?id={{t.tag}} |safeurl"&gt;Join&lt;/a&gt;
  </code></pre>