Angular: Radiobutton, using ng-value for true/false
HTML
<div ng-app>
<div ng-controller="TestingCtrl">
<input ng-model="boolValue" type="radio" name="typeArbeidsgiver" ng-value="true" id="hovedarb">Yes
<br>
<input ng-model="boolValue" type="radio" name="typeArbeidsgiver" ng-value="false">No
<p>{{boolValue}}</p>
</div>
</div>
CSS
</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.4/angular.min.js"></script> <style> .done-true {
text-decoration: line-through;
color: grey;
}
JavaScript
function TestingCtrl($scope) {
$scope.boolValue = ;
}