2015-02-09 47 views

回答

0

您需要的所有東西都是將st-sort與表體中的相應名稱進行匹配,請參閱下面的示例。點擊「年齡」然後將只對「年齡」列進行排序。

<table st-table="example" class="table table-striped"> 
    <thead> 
    <tr> 
     <th></th> 
     <th st-sort="name">Name</th> 
     <th st-sort="age">Age</th> 
    </tr> 
    </thead> 
    <tbody> 
    <tr ng-repeat="example in examples"> 
     <td cs-select="row"></td> 
     <td>{{example.name}}</td> 
     <td>{{example.age}}</td> 
    </tr> 
    </tbody> 
</table> 
相關問題