*ngIf and *ngFor on <td></td> element : <p>I have a situation where I need *ngIf and *ngFor directive on the same element. I found lot of answers on the stackoverlow but none for the this type of situation.</p>

<p>I have a table in which I'm looping through the array of objects and dynamically write cells in header:</p>

<pre><code> &lt;table border="1" width="100%"&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;td *ngFor="let item of headerItems" *ngIf="item.visible"&gt;{{ item?.name }}&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
            ...
        &lt;/tbody&gt;
    &lt;/table&gt;
</code></pre>

<p>I want to show/hide  if object contains visible set to true. How can I achieve this?</p>
