angularjs - 我如何通过选中的复选框对数据表进行排序
问题描述
app.controller('projetTableController', function($scope,$http,$compile,CRUDService) {
$scope.init = function(){
CRUDService.init($scope);
var filtres = [];
var columns = [
{mDataProp : 'id',"visible":false,"searchable":false} ,
{"sWidth": "10px", bSortable: false,searchable:false , orderable: false,"mRender": function(data, type, full) {
return '<input type="checkbox" ng-disabled="mode == \'read\'" ng-checked="checkedP('+full.id+')" ng-click="toggleCheckedP('+full.id+')" />';
}},
{mDataProp : 'denomination'}
];
$scope.tableProjet = TableManager.initCompiled("projetTable","/projet/rest/list", columns,filtres,$compile,$scope);
};
});
解决方案
<div class="row">
<div class="col-md-12">
<table id="projetTable"
class="table table-striped table-bordered"
ng-controller="projetTableController"
th:attr="ng-init='init();'">
<thead>
<tr>
<th class="noVis"></th>
<th class="actions noVis"></th>
<th><th:block
th:text="#{administration.user.projet.list.denomination}"></th:block></th>
</tr>
</thead>
</table>
</div>
</div>
推荐阅读
- django - Django表单动态下拉列表创建
- magento2 - 如何直接看到 Magento2 中的创建密码页面?
- python - 如何从python appengine更新firestore
- maven - 在maven项目中将文件夹声明为idea-resource文件夹?
- python - 为什么在 Ubuntu 中读取 Python OpenCV 摄像头比 Windows 慢?
- json - Apache Axis2 应用程序/json 不返回格式良好的 json 对象
- r - R 中 louvain() 返回的社区对象的解释
- java - 为什么 ConcurrentSkipListSet 升序迭代器比降序迭代器“更快”?
- angular - 在Angular中重复自动单击按钮的脚本
- php - 从mysql中的不同表中提取两列