title: Using ngSwitch on a numeric range in Angular 2
body: <p>I have recently started learning Angular2.</p>
  
  <p>I want to know if there is a possibility to use ngSwitch or ngIf angular2 </p>
  
  <p>directives for a specific numeric range?</p>
  
  <p>Say I want to update the color of some text based on a range.</p>
  
  <pre><code>&lt;25 = Mark the text in red
  &gt;25 &amp;&amp; &lt;75 = Mark the text in orange
  &gt;75 = Mark the text in green
  </code></pre>
  
  <p>How do I achieve the same using Angular2 ngIf/ngSwitch directives.</p>
  
  <p>Is there a way something to write like this ?</p>
  
  <pre><code>&lt;div [ngIf]="item.status &lt; 25"&gt;
  &lt;h2 class="text-red"&gt;{{item.status}}&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div [ngIf]="item.status &gt; 25 &amp;&amp; item.status &lt; 75"&gt;
  &lt;h2 class="headline text-orange"&gt;{{item.status}}&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div [ngIf]="item.status &gt; 75"&gt;
  &lt;h2 class="headline text-green"&gt;{{item.status}}&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Or anything that would have to do with using ngSwitch, ngSwitchWhen statements.</p>