ng-table-dynamic排序不适用于动态列

时间:2016-04-06 19:41:22

标签: angularjs sorting ngtable

我正在尝试使用ng-table-dynamic,排序不起作用。 我在作用域中有cols和rows,数据显示正确,我可以看到排序图标,但点击它们时数据不会排序。

<table ng-table-dynamic="tableParams with cols" class="table table-condensed table-bordered table-striped">
  <tr ng-repeat="row in rows">
    <td ng-repeat="col in cols">
      <div ng-if="row[col.field]['value']" style="color:{{row[col.field]['color']}}">{{row[col.field]['value']}}</div>
      <div ng-if="!row[col.field]['value']">{{row[col.field]}} </div>
    </td>
  </tr>
</table>

1 个答案:

答案 0 :(得分:0)

编辑代码后工作。我不明白ng-table-dynamic是如何运作的,感谢Danda!

curl -a \
-H 'Referer: https://thesite/mobile/dashboard/dash.html'   \
-H 'Cookie:JSESSIONID='${COOKIE}                           \
   'https://thesite/api/data/1036493/outTemp/lastMonth?noCacheDummyValue=1459972646687'   \
   -o lm_outTemp.get \
-L 'https://thesite/api/data/1036493/heatEnergy/lastMonth?noCacheDummyValue=1459972646694' \
   -o lm_heatEnergy.get