title: *ngFor and *ngIf on a <tr> element in Angular 5
body: <p>In my Angular 5 app I'm looping to create <code>tr</code> elements:</p>
  
  <pre><code>&lt;tr *ngFor="let element of elements"&gt;
  </code></pre>
  
  <p>but I only want to show the row if certain conditions are met.  I know I can't use <code>*ngFor</code> and <code>*ngIf</code> together, but I'm not seeing how to get around this.  </p>
  
  <p>I saw a post saying to add a template inside the tr with an <code>[ngIf]</code> construct but that doesn't seem to be valid syntax any longer.  If I try it like so:</p>
  
  <pre><code>&lt;tr *ngFor="let element of elements"&gt;
      &lt;template [ngIf]="element.checked || showUnchecked"&gt;
  </code></pre>
  
  <p>then I get runtime errors.</p>
  
  <blockquote>
    <p>AppComponent.html:14 ERROR Error: StaticInjectorError(AppModule)[NgIf -> TemplateRef]:<br>
        StaticInjectorError(Platform: core)[NgIf -> TemplateRef]:<br>
          NullInjectorError: No provider for TemplateRef!</p>
  </blockquote>