2015-07-10 100 views
1

这是我为可排序表格编写的代码。我已经在angular-tableSorter的例子中给出了正确位置的ts-wrapper,ts-repeat。但这不起作用,请帮助我。angular-tablesorter不工作

var app = angular.module('emnApp',['ngRoute','anguFixedHeaderTable','angular-tablesorter']);
<table id="myTable" fixed-header class="table table-striped tableChck marB0" ts-wrapper> 
 
    <thead> 
 
     <tr class="tableheadPP"> 
 
      <th ng-repeat="col in TableColumns" ts-repeat>{{col}}</th> 
 
     </tr> 
 
    </thead> 
 

 
    <tbody class="container tableContainer pad0"> 
 
     <tr class="tablerowPP" ng-repeat="history in HistoryTable"> 
 
      <td ng-repeat="col in history track by $index" ts-repeat>{{col}}</td> 
 
     </tr> 
 
    </tbody> 
 
</table>

+0

什么不起作用可以请您详细了解一下吗? 。也可以请你添加你的角码 –

+0

我没有得到一个可排序的表。 –

回答

0

试图把在任何你想要的那些做排序,并置于TS-默认为默认的排序列标题TS-标准。

然后移除'track by $ index'。 Angular-tablesorter库似乎不能很好地跟踪。