angularify.semantic.rating - rating directive for angular.js.
<rating id="my-rating" size="large" type="heart" ng-model="rating"></rating>var ratingApp = angular.module('ratingApp', ['angularify.semantic.rating']);
function RootCtrl ($scope) {
$scope.rating = 2;
}IMPORTANT Every <rating> must have unique id attribute.
Rating can have following properties:
-
size- can be:small,large,hugeorundefined -
type- can be any icon class (see semantic-ui docs) -
ng-model- returnIntnumber: 0..5 (current rating)
- Fork main repository.
- Make changes.
- Create issue.
- Send pull request.
- Thank you.
- Add more tests.