How to detect undefined in ngSwitch and ngSwitchWhen? (Angular 2)
<p>How to detect <strong>undefined</strong> in <code>ngSwitch</code> and <code>ngSwitchWhen</code>?</p>

<p>I tried these three ways below, but neither works. It always shows <strong>Not undefined</strong>.</p>

<p>Thanks</p>

<pre><code>&lt;div [ngSwitch]="value"&gt;
  &lt;p *ngSwitchWhen="undefined"&gt;11&lt;/p&gt;
  &lt;p *ngSwitchWhen="'undefined'"&gt;22&lt;/p&gt;
  &lt;p *ngSwitchWhen=""&gt;33&lt;/p&gt;
  &lt;p *ngSwitchDefault&gt;Not undefined&lt;/p&gt;
&lt;/div&gt;

value: string;
</code></pre>

<p><strong>UPDATE:</strong></p>

<p>@basarat pointed out why it is like this, and please follow this for more details:</p>

<p><a href="https://github.com/angular/angular/issues/7637#issuecomment-197619354" rel="nofollow">https://github.com/angular/angular/issues/7637#issuecomment-197619354</a></p>