title: Angular Custom Pipe Arguments
body: <p>I have a custom Pipe where I am passing text along with some arguments 
  Here I am passing a text like "My name is %name%" which will get transformed to 
  "My name is {{name}}"
  in the arguments I am passing name:"ABC" how do I replace {{name}} to ABC that I am passing in the arguments.</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core'; 
  import { DomSanitizer } from '@angular/platform-browser';
  
  @Pipe({   name: 'textTransform' }) 
  export class textTransform implements PipeTransform {   
      constructor(private sanitized: DomSanitizer) {}   
  
      transform(value: any, args?: any[]): any {
          let val = [];
          value = value.replace(/%.*?%/g, m =&gt; { m = m.slice(1, -1); 
          return this.sanitized.bypassSecurityTrustHtml(value);   
      }
  }
  </code></pre>
  
  <p>args is an array of key values like a<code>rgs[0].name="abc", args[0].age=11</code> 
  so if the string is <code>"My Name is {{name}} and I am {{age}} years old"</code> should be transformed to <code>"My Name is abc and I am 10 years old"</code> </p>