1

I have the below checkbox code and i have to get value instead of true and false when it is selected.

<input type='checkbox' value="Athlete" ng-model="p.selected">

In the console p.selected displays true or false but i need value which is Athlete.How to change it?

1 Answer 1

3

You can use ng-true-value="'Athlete'" ng-false-value="'not Athlete'" to achieve this.

You can find more information here.

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.