1

I want to toogle value on click, so if value of $scope.customize is false then it should set as true & vice versa.

$scope.customize = false;

<div ng-if="customize">
     <button class="btn btn-sm btn-success">Save</button>
     <button class="btn btn-sm btn-primary">Add</button>
</div>

<span title="Customize" ng-click="????">Customize</span>

What to code in span ng-click to toggle values?

1 Answer 1

5

ng-click="customize = !customize"

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

1 Comment

and off course customize should be initialized in advance.

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.