1

I just started using angularjs. I am using angularjs bootstrap-ui for this project. I am rating directive and I want to change the max value. But the changes are not reflected on the rating directive

<rating ng-model="rate" max="max"></rating>
<a href="#" ng-click="change(10)">Change Max</a>

I start with $scope.max = 5 it works. But if I change the max using a function like so.

$scope.change = function(value) {
   $scope.max = value;
}

This is not reflected in the directive.

I appreciate any help.

1 Answer 1

1

It does work - I tried it out in the below plunker. http://plnkr.co/edit/trD0zNYW8Var8eEWrKPj?p=preview

<rating ng-model="rate" max="max" readonly="isReadonly" on-hover="hoveringOver(value)" on-leave="overStar = null"></rating>
    <a href="#" ng-click="change(8)">Change Maxim</a>

Can you console.log and see the output?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.