I have a table with data displayed using ng-repeat and it is currently sorted properly. To view the initial setup, check out the first fiddle.
http://jsfiddle.net/HB7LU/10201/
<tr ng-repeat="each in list | orderBy:predicate:reverse">
I am aiming to prevent repetition of the name in the first column (Name) when the following row has the same name. The second fiddle demonstrates this scenario.
http://jsfiddle.net/HB7LU/10204/
<td ng-show="list[$index].name != list[$index-1].name">{{each.name}}</td>
Initially, this approach works well, but issues arise when the columns are sorted by clicking on the headers. The data becomes inaccurate due to the usage of list for the $index. I am unsure if there is an alternative solution to this issue. Perhaps there is a more efficient way to achieve the desired outcome.
Feel free to ask for more details if needed. Thank you! T