It is totally doable. Copy down the ui-bootstrap code and alter it a little bit. I hacked inside and it seems to be working great. Check out a working PLUNKER. Here are the changes I made, they can be seen on lines 2493-2559.
First I went into the directive and added maxRange as a two-way bound object
scope: {
value: '=',
onHover: '&',
onLeave: '&',
maxRange: '=max'
},
Then I went into the controller and changed a few things so I could watch the maxRange value and update the objects based on that.
$scope.$watch('maxRange', function() {
$scope.range = createRateObjects(new Array(parseInt($scope.maxRange)));
});
Hacking rocks. Don't be afraid to modify other people's code a little bit if it doesn't fit your needs!