Is there a way to save the value from a checkbox into a string?
<label style="color:black; text-decoration:none; font-size:15px" href="#">
<input type="checkbox" ng-model="diet.v1" ng-true-value="'&diet=high-fiber'" ng-false-value="''" />High-Fiber</label>
I am trying to figure out how to extract the value from ng-true-value
when the checkbox is checked, and store it in a string for later use. However, using console.log(diet.v1); in JavaScript does not seem to work. Any suggestions on how to achieve this?