0

I am using ng-table to list a set of elements, and am needing to group the elements in the table.
I want to be able to redefine what the data is sorted by, (even if this means having to redefine the table), as the creation of the table is fast.
I have had a go on JSFiddle, but it doesn't seem to be able to update the grouping.

I aim to have something like the following:

1. create table using initial data, and default grouping column
2. change grouping column using a variable
3. table updates to reflect changed grouping variable

I thought of maybe using an ng-if to surround the entire ng-table, as I've read that it destroys the DOM elements inside it when evaluated to false, but this is a drastic measure to something that may be fairly easy to solve.

Link to JSFiddle

4

1 回答 1

0

我找到了我要找的东西。在此处
查看更新的 JSFiddle 。

我所要做的就是调用这个$scope.tableParams.reload()函数。
我没有找到任何关于此的文档,最终查看了源代码。

JSFiddle 链接

于 2014-07-09T11:56:21.783 回答