I am trying to bind directive's attribute to a scope variable. I would like my UI Bootstrap control to dynamically change appearance when this scope variable changes value.
Here is the plunker: http://plnkr.co/edit/gEjerpXhy3IuT5qRNeL8?p=preview
Every time you press on some of the checkmarks, $scope.max is increased by 1. But, since that same $scope.max is passed to the 'rating' element as the 'max' attribute, I would like this 'rating' element to put additional checkmark on the right every time I click on some of the existing checkmarks.
I guess I am trying to re-draw this 'rating' element with new parameters. Is this possible and how?