Skip to content

The callback function binding has changed form two-way to method binding

Latest
Compare
Choose a tag to compare
@akempes akempes released this 06 Oct 23:25
· 6 commits to master since this release

The callback function binding has changed form two-way to method binding. This will allow you to pass your own variables to the callback function AND the current rating is passed in the rating parameter:

<ng-rate-it ng-model="model.basic" rated="myCallback(rating, 'Your own var')"></ng-rate-it>
$scope.myCallback = function (rating, cusotmVar) {
	console.log(rating, customVar);
}

To upgrade from v3 to v4, just add () after your function name.