ng-true-value sets true value for checkbox
Description
The following code shows how to use ng-true-value to set true value for checkbox.
Example
<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--from w w w . jav a 2 s . c om-->
<body>
<label class="checkbox">
<input type="checkbox"
ng-model="user.role"
ng-true-value="admin"
ng-false-value="basic"> Is Administrator</label>
<pre ng-bind="user | json"></pre>
</body>
</html>