我的智能表中的所有列都有 st-sort 指令。当用户单击特定列时,如何获取当前排序列?有什么技巧还是我必须听那些列标题上的点击事件?
最佳答案
您可以使用指令 st-pipe,此函数将被调用以对事件进行排序、分页或过滤。
<table st-table="displayedCollection" st-safe-src="rowCollection" st-pipe="customPipe">
$scope.customPipe = function(tableState){
console.log(tableState.sort);
}
关于angularjs - 如何在智能表中获取当前排序列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33836288/