I'm doing ng-repeat to output checkboxes from array.
<div class="row-fluid">
<label ng-repeat="checkbox_ in checkboxes" class="checkbox"
for="checkbox_{{$index}}">
<input name="checkbox_{{$index}}" id="checkbox_{{$index}}"
ng-model="checkbox_.checked"
ng-true-value="{checkbox_.value}"
type="checkbox">
{{checkbox_.text}}
</label>
</div>
data
$scope.checkboxes = [
{"text": "text1", checked:false},
{"text": "text2", checked:false},
{"text": "text3", checked:false},
{"text": "text4", checked:false}
];
After that i want to get access to checkbox_1 for example...
<hr>
checkbox_1.checked - {{checkbox_1.checked}}<br>
checkbox_1.value - {{checkbox_1.value}}<br>
checkboxes[1].checked - {{checkboxes[1].checked}}<br>
checkboxes[1].value - {{checkboxess[1].value}}<br>checkbox_1.value - {{checkbox_1.value}}<br>
<div ng-show="checkboxes[1].checked">on</div>
And nothing happens http://jsfiddle.net/MQzGP/3/
How to get access to checkbox1 value 'text2' when user sets it true? ty