----html----------------------------------------------
<tr class="gradeX" ng-repeat="rolePrivilege in rolePrivilegeList" id="tr_{{rolePrivilege.id}}">
<td>
<label class="am-checkbox-inline">
<input type="checkbox" value="{{rolePrivilege.id}}" ng-checked="idChecked(rolePrivilege.id)" ng-click="select($event,rolePrivilege.id)">
</label>
</td>
<td ng-bind="rolePrivilege.name"></td>
<td ng-bind="rolePrivilege.describe"></td>
<td ng-bind="rolePrivilege.createTime"></td>
<td ng-bind="rolePrivilege.updateTime"></td>
</tr>
<button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success"ng-click="bind(privilegeArray)">绑定</button>
----controller----------------------------------------------
$scope.privilegeArray = [];
$scope.select = function($event,id){
_checkbox = $event.target ;
checked = _checkbox.checked ;
if(checked){
$scope.privilegeArray.push(id) ;
}else{
_id = $scope.privilegeArray.indexOf(id) ;
$scope.privilegeArray.splice(_id,1) ;
}
}
$scope.bind = function(privilegeArray){
console.log(privilegeArray);
}