title: Angular 5 star rating bar
body: <p>I want to show 5 star rating bar using angular and currently my code work only for integers with full star. But i want to use half stars for decimal values. how can i change this code. I can't use IF in my angular version.</p>
  
  <pre><code>&lt;li ng-repeat="Star in [1,2,3,4,5]"&gt;
       &lt;div ng-switch="Item.ItemDetails.Rating &gt;= Star"&gt;
            &lt;div ng-switch-when="true"&gt;
                 &lt;img src="~/Images/star.png" class="star" /&gt;
             &lt;/div&gt;
             &lt;div ng-switch-when="false"&gt;
                 &lt;img src="~/Images/star_gray.png" class="star" /&gt;
             &lt;/div&gt;
       &lt;/div&gt;
  &lt;/li&gt; 
  </code></pre>