1. 程式人生 > >AngularJS中checkbox是否選中的繫結變數問題

AngularJS中checkbox是否選中的繫結變數問題

在html中

<input type="checkbox" ng-checked="ifItemChecked"></span>

在controller裡面
$scope.ifItemChecked = true;

即可實現選中控制