Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use Radio buttons for a boolean with Angular 1.3
<h1>How to use radio buttons to represent a boolean?</h1>
<!-- It's important to use `ng-value` for the boolean value and not just `value` -->
<h3>Enable some setting?</h3>
<label><input type="radio" ng-model="myBoolean" ng-value="false"> Yes</label>
<label><input type="radio" ng-model="myBoolean" ng-value="true"> No</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment