I've created an application in angular-JS for sorting values in tables. Certain columns in tables are dynamic and been created based on the child JSON array
For example the JSON structure returning from a service is in the structure where the others field of the main JSON contains another JSON array which is the additional columns,
In the below structure the
first object has File 4,
second object has File 1 and File 2,
third object has File 2 and File 3 and
fourth object has File 3 and File 4
so all together there will be four additional dynamic columns i.e File 1, File 2, File 3, File 4 each object has value for the corresponding File field, sometime present sometime not present.
<th ng-repeat="colms in getcolumns()"><a ng-click="sort_by("dont know wat to pass")">
<i>{{colms}}</i>
</a>
</th>
I've shown the tables with the dynamic columns perfectly also I've implemented the sorting for each columns using angular-js. But the problem is that the sorting is working for all table columns except the dynamic columns
Can anyone please tell me some solution for this
My JS-Fiddle is given below