我的列标题未使用智能表格正确排序。他们不是单独排序,而是一起排序。
<thead>
<tr>
<th st-sort="field" ng-repeat="field in stat.q">{{field}}</th>
</tr>
</thead>
这是javascript。
stat.q = ["Who is the coolest?", "What is your favorite color?", "Pick a movie", "Where do you want to go?", "test rating"];
最佳答案
要使用 ng-repeat,您必须将大括号放在 {{field}} 周围:
<thead>
<tr>
<th st-sort="{{field}}" ng-repeat="field in stat.q">{{field}}</th>
</tr>
</thead>
关于javascript - 智能表格无法正确排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31455383/