| <!doctype html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <title>Example - example-checkbox-input-directive-production</title> |
| |
| |
| <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.4/angular.min.js"></script> |
| |
| |
| |
| </head> |
| <body ng-app=""> |
| <script> |
| function Ctrl($scope) { |
| $scope.value1 = true; |
| $scope.value2 = 'YES' |
| } |
| </script> |
| <form name="myForm" ng-controller="Ctrl"> |
| Value1: <input type="checkbox" ng-model="value1"> <br/> |
| Value2: <input type="checkbox" ng-model="value2" |
| ng-true-value="YES" ng-false-value="NO"> <br/> |
| <tt>value1 = {{value1}}</tt><br/> |
| <tt>value2 = {{value2}}</tt><br/> |
| </form> |
| </body> |
| </html> |