title: Using a pipe under a different name
body: <p>I'm using the ngx-translate internationalization library in my Angular 6 app. Right now a translation in one of my templates is done like this:</p>
  
  <pre><code>&lt;span&gt;{{ 'HELLO' | translate:param }}&lt;/span&gt;
  </code></pre>
  
  <p>However, it would be great if I could have it this way:</p>
  
  <pre><code>&lt;span&gt;{{ 'HELLO' | i18n:param }}&lt;/span&gt;
  </code></pre>
  
  <p>All I have to do is somehow give the pipe a name alias, but I have no idea how to accomplish that. I started to write something like...</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  import { TranslateService } from '@ngx-translate/core';
  
  @Pipe({ name: 'i18n' })
  export class I18nPipe implements PipeTransform {
  
    constructor(private i18n: TranslateService) { }
  
    transform(key: string, ...args: any[]): any {
      this.i18n.get(key).subscribe((res: string) =&gt; {
          return res || key;
      });
    }
  
    // How to return if async? How to process args?
  
  }
  </code></pre>
  
  <p>But should I even code it this way, or is there maybe a simple general way in Angular to alias pipes?</p>
  
  <p>Another way I tried:</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  import { TranslatePipe } from '@ngx-translate/core';
  
  @Pipe({ name: 'i18n' })
  export class I18nPipe extends TranslatePipe implements PipeTransform {
  
    transform(key: string, args?: any): any {
      return super.transform(key, args);
    }
  
  }
  </code></pre>
  
  <p>This gives me an error:</p>
  
  <pre><code>ERROR TypeError: Cannot read property 'get' of undefined
      at I18nPipe.updateValue (ngx-translate-core.js:1058)
      at I18nPipe.transform (ngx-translate-core.js:1097)
      at I18nPipe.transform (i18n.pipe.ts:8)
  </code></pre>