Simple star rating directive for AngularJS
http://eowo.github.io/angular-star-rating
You can download all necessary angular-star-rating files manually or install it with bower:
$ bower install --save angular-star-rating
This directive uses Material icons. The easiest way to set up icon fonts:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
To use the directive, include the angular-star-rating's javascript file in your web page:
<script src="angular-star-rating.js"></script>
angular.module('yourApp', ['angular-star-rating']);
- read-only - {Boolean} (defaults to false)
- size - {Number} (defaults to 5)
Read-only mode:
<rating read-only="true" ng-model="modelVar"></rating>
Validation:
<rating ng-model="modelVar" ng-required="true"></rating>
Size:
<rating size="10" ng-model="modelVar"></rating>