Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think this example by using bootstrap might be helpful: <kbd><a href="http://plnkr.co/edit/kFKejRU0G2wmkD7GlNdH?p=preview" rel="nofollow noreferrer">Plunker</a></kbd></p> <p><img src="https://i.stack.imgur.com/eTB3l.png" alt="enter image description here"></p> <p><strong>HTML</strong></p> <pre><code>&lt;form class="Scroller-Container" ng-submit="submit()" &gt;&lt;/form&gt; &lt;rating value="rate" max="max" readonly="isReadonly" on-hover="hoveringOver(value)" on-leave="hoveringLeave(rate)" &gt; &lt;/rating&gt; &lt;span class="badge" ng-class="{'badge-warning': percent&lt;30, 'badge-info': percent&gt;=30 &amp;&amp; percent&lt;70, 'badge-success': percent&gt;=70}" ng-show="overStar &amp;&amp; !isReadonly"&gt; {{percent}}% &lt;/span&gt; &lt;input type="submit" id="submit" value="Submit" /&gt; &lt;/form&gt; </code></pre> <p><strong>JS</strong></p> <pre><code>var RatingDemoCtrl = function ($scope) { $scope.myRate = 0; $scope.submit = function() { console.log($scope.percent) ; //null } $scope.rate = 1; $scope.max = 5; $scope.isReadonly = false; $scope.percent = 20; $scope.hoveringOver = function(value,object) { console.log('hoveringOver', value); $scope.overStar = value; $scope.percent = (100 * $scope.overStar) / $scope.max; }; $scope.hoveringLeave = function(rate) { console.log('hoveringLeave', $scope.rate); $scope.percent = (100 * $scope.rate) / $scope.max; }; }; </code></pre> <p>You can override it and provide custom image. But the way is the same (with <code>ng-class</code> for example)</p> <p>BTW, here is a icon library from there you can fetch star/half-star/empty star: <a href="http://fortawesome.github.io/Font-Awesome/icons/" rel="nofollow noreferrer">Awesome Icons</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload