title: Angular 2 .Replace Pipe
body: <p>I've created a replace pipe as follows:</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  @Pipe({name: 'replace'})
  export class ReplacePipe implements PipeTransform {
    transform(value: string): string {
      let newValue = value.replace(/&amp;/g, "&amp;amp;").replace(/&lt;/g, "&amp;lt;").replace(/&gt;/g, "&amp;gt;").replace(/\n/g, '&lt;br&gt;');
      return `${newValue}`;
    }
  }
  </code></pre>
  
  <p>I declared it in @NgModule section of app.module. I am using it on the page as follows:</p>
  
  <pre><code>&lt;ion-card-content [innerHtml]="Message | linky | replace"&gt;&lt;/ion-card-content&gt;
  </code></pre>
  
  <p>I can't figure out where I am making the mistake because I can't get it to work. I tried removing linky pipe but no luck. Any help is much appriciated. Thanks Guys</p>