Best way to check for null values using *ngFor in Angular 2 : <p>I'm showing some records coming from an <code>api</code> and some of the results are null and I would like to show a different value in case the response values are null. How would be the best way to do it?</p>

<p>Below is my code: </p>

<p>Component: </p>

<pre><code>import {Component, OnInit} from '@angular/core';
import {PerformancesService} from '../../services/performances.service';
import {Performance} from '../../common/performance';

@Component({
    selector: 'performances',
    templateUrl: './app/components/performances/performances.component.html'
})

export class PerformancesComponent implements OnInit{
    performances: Performance[];

    constructor(private _service : PerformancesService){

    }

    getFunds(){
        this._service.getData().then(
            performances =&gt; this.performances = performances
        )
    }

    ngOnInit(){ 
        this.getFunds();
    }
}
</code></pre>

<p>template: </p>

<pre><code>&lt;h2&gt;Performance&lt;/h2&gt;

&lt;table class="table table-hover"&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Fund Id&lt;/th&gt;
          &lt;th&gt;Country Id&lt;/th&gt;
          &lt;th&gt;1Mth&lt;/th&gt;
          &lt;th&gt;3Mth&lt;/th&gt;
          &lt;th&gt;YTD&lt;/th&gt;
          &lt;th&gt;1Yr&lt;/th&gt;
          &lt;th&gt;3Yrs&lt;/th&gt;
          &lt;th&gt;5Yrs&lt;/th&gt;
          &lt;th&gt;10Yrs&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr *ngFor="let performance of performances"&gt;
        &lt;td&gt;{{performance.id}}&lt;/td&gt;
        &lt;td&gt;{{performance.country_id}}&lt;/td&gt;
        &lt;td&gt;{{performance.OneMonthBack}}&lt;/td&gt;
        &lt;td&gt;{{performance.ThreeMonthsBack}}&lt;/td&gt;
        &lt;td&gt;{{performance.YearToDate}}&lt;/td&gt;
        &lt;td&gt;{{performance.OneYearBack}}&lt;/td&gt;
        &lt;td&gt;{{performance.ThreeYearsBack}}&lt;/td&gt;
        &lt;td&gt;{{performance.FiveYearsBack}}&lt;/td&gt;
        &lt;td&gt;{{performance.TenYearsBack}}&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>I don't know if I could do it in the template or I should check each value in my component. Any idea?
Thanks!</p>
