我使用ui-grid来显示权限。在cellTemplate displaying checkbox and perfoming ..like selected复选框和all checkbox selection.Now I want to add checkbox in header中,单击复选框后,选择all all.If checkbox并取消选择只有一个选中的'-‘符号必须出现...这是我正在尝试的代码
angular.forEach($scope.moduleRoles, function (role, key) {
$scope.mgridOptions.columnDefs.push({name: role, displayName: role, width: 150,headerCellTemplate: "<span> \
<span ng-class=\"'colt' + col.index\" class=\"ngHeaderText\"> \
{{col.displayName}} \
'<input type=\"checkbox\" ng-model=\"role.checked\" class=\"chckBox\" ng-click=\"checkAll(role.checked);\">' \
</span> \
</span>" , cellTemplate: '<input type="checkbox" ng-model="row.entity.roles[\'' + key + '\'].selected" ng-click="grid.appScope.updateModulePerms(row.entity,\'' + key + '\')">'});
});
$scope.moduleRoles包含来自服务器的角色数据。我可以在标题中添加复选框..But checkAll功能不起作用,并且无法更改复选框的设计。
Where I am wrong.Please帮助
https://stackoverflow.com/questions/38244780
复制相似问题