title: Use Angular Pipe within shorthand if statement
body: <p>How can I use a custom pipe within a shorthand if statement??</p>
  
  <p>This is the code I am trying to use </p>
  
  <p><code>&lt;h1&gt;Total Value {{data ? totalValue | moneyFormat : '$0'}}</code></p>
  
  <p>and this is the error I am getting </p>
  
  <pre><code>Template parse errors:
  Parser Error: Conditional expression data ? totalValue | moneyFormat : null requires all 3 expressions at the end of the expression
  </code></pre>
  
  <p>So basically I have set up a pipe that formats money, this is my pipe</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  
  @Pipe({name: 'moneyFormat'})
  export class MoneyFormatPipe implements PipeTransform {
      transform(value: number) {
          const formatter = new Intl.NumberFormat('en-US', {
            style: 'currency',
            currency: 'USD'
          });
          let formattedValue = formatter.format(value);
          formattedValue = formattedValue.slice(0, -3);
          return formattedValue;
      }
  }
  </code></pre>
  
  <p>Now I know this works since I have used this else where in scenarios like </p>
  
  <p><code>&lt;p&gt;This is your dollar amount {{dollarAmount | formatMoney}}</code></p>
  
  <p>Am I missing something? Am I doing this wrong?</p>
  
  <p>Keep in mind what I have done is an example for simplicity sake and not the true functionality of the conditional statement. I am fully aware I could return $0 using the pipe.</p>