How to use ngSwitch with template?
<p>I have template with IF statement:</p>

<pre><code>&lt;li *ngIf="activity.entity_name == 'Project'" [activity-project-item]="activity"&gt;&lt;/li&gt;
&lt;li *ngIf="activity.entity_name == 'Tooling'" [activity-tooling-item]="activity"&gt;&lt;/li&gt;
&lt;li *ngIf="activity.entity_name != 'Project' &amp;&amp; activity.entity_name != 'Tooling'" [activity-item]="activity"&gt;&lt;/li&gt;
</code></pre>

<p>How to write this template with ngSwitch directive?</p>

<p>For example this template has parse error "Components on an embedded template":</p>

<pre><code>&lt;li [ngSwitch]="activity.entity_name"&gt;
    &lt;template [ngSwitchCase]="'Project'" [activity-project-item]="activity"&gt;&lt;/template&gt;
&lt;/li&gt;
</code></pre>

<p>And this template has parse error "No provider for NgSwitch":</p>

<pre><code>&lt;template [ngSwitch]="activity.entity_name"&gt;
    &lt;li [ngSwitchCase]="'Project'" [activity-project-item]="activity"&gt;&lt;/li&gt;
&lt;/template&gt;
</code></pre>