title: How to use ngSwitch on datatype in angular?
body: <p>I was working in angular2 and was curious to know whether I could use ngSwitch to load <code>&lt;div&gt;</code> tag when variable is of certain datatype.i.e.
  something like this:</p>
  
  <pre><code> &lt;div [ng-switch]="value"&gt;
    &lt;p *ng-switch-when="isObject(value)"&gt;This is Object&lt;/p&gt;
    &lt;p *ng-switch-when="isArray(value)"&gt;This is Array&lt;/p&gt;
    &lt;p *ng-switch-when="isBoolean(value)"&gt;This is Boolean&lt;/p&gt;
    &lt;p *ng-switch-when="isNumber(value)"&gt;This is Number&lt;/p&gt;
    &lt;p *ng-switch-default&gt;This is Simple Text !&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>is this possible to load the <code>div</code> tag when variable is of certain datatype?
  if not, any workaround for this?</p>