<tr ng-repeat="languages in samln">
<td>
<span>{{languages.emplang}}</span>
</td>
<td>
<input type="checkbox" name="checkbox1-" id="sp1" value="false" style="margin-left:40px;" ng-model="languages.speak">
</td>
<td>
<input type="checkbox" name="checkbox2-" id="rea1" value="false" style="margin-left:40px;" ng-model="languages.read">
</td>
<td>
<input type="checkbox" name="checkbox3-" id= "wr1" value="false" style="margin-left:40px;" ng-model="languages.write">
</td>
</tr>
它有两个字符串值 true 和 false。我给出了 value="false"但复选框没有被选中,这里的语言是一个列表。
最佳答案
<input type="checkbox" name="" value="" ng-checked="check" />
in controller
$scope.check = true;
关于javascript - Angular js 中未选中复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35082326/