0

Using Angularjs

I have a ng-change on a text field and the function is called as expected:

<input type="text" ng-model="toggleState" ng-change="ToggleGroupVisiable()" data-rule"" />

My question is how do I reference the value of the text box (that is being changed) in the function ToggleGroupVisiable() which is called on changes.

    $scope.ToggleGroupVisiable = function () {

     ... some code ...
}

1 Answer 1

1

Should be bound with the ng-model. So something like $scope.toggleState.

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.