ng-table
ng-table copied to clipboard
Dynamic Columns not Sorting
http://plnkr.co/edit/R3sAzRKpELn9349uSYyj?p=preview
I'm receiving a json payload that requires me to create an unknown number of columns. The above plunk is showing what I am trying to do. Perhaps someone could show me a better way to do this.
You are using same soring key change for all three columns.
You must change your column description to have different names, like
$scope.columns = [
{ title: 'Week1', field: 'change1'},
{ title: 'Week2', field: 'change2'},
{ title: 'Week3', field: 'change3'}
];
And implement custom filter and order for your data, to handle names.