Skip to content

Instantly share code, notes, and snippets.

View Ionic rating with Half-star
angular.module('myApp')
.directive('starRating', function () {
return {
restrict: 'A',
template: '<ul class="rating"><li ng-repeat="star in stars" ng-class="star" class="icon ion-ios7-star" ng-click="toggle($index)"></li></ul>',
scope: {
ratingValue: '=',
max: '=',
readonly: '@',
onRatingSelected: '&'