title: How can I call a service within a pipe?
body: <p>There is a way to inject and call a service within a pipe? I have a service with currencies and I want to use it to get the name based on the id. 
  Thanks!!</p>
  
  <p>This is my code: </p>
  
  <pre class="lang-js prettyprint-override"><code>@Pipe({name: 'currencypipe', pure: false})
  export class CurrencyPipe implements PipeTransform {
      symbol: string = null;
  
      constructor(private currencyService: CurrencyService) {
  
      }
  
      transform(value: number, currencyId: number): Promise&lt;String&gt; {
          return this.currencyService.getCurrencie(currencyId).then(response =&gt; {
                  return (value + " " + response.symbol);
              }
          );
      }
  }
  </code></pre>
  
  <p>And I use it like this </p>
  
  <pre class="lang-js prettyprint-override"><code>{{3 | currencypipe: 2 | async}}
  </code></pre>