HI I am getting different result in chrome and firefox browser of sorting of data. Firefox shows correct one.
HTML :
<table class="datatable">
<thead>
<tr>
<th width="5%" class="Rank">Rank <a ng-click="sort_by('Rank')"><i class="icon-sort" ng-show="pagedItems[currentPage].length > 1"></i></a></th>
<th width="10%" class="Interviews">Interviews <a ng-click="sort_by('Interviews')"><i class="icon-sort" ng-show="pagedItems[currentPage].length > 1"></i></a></th>
<th width="25%" class="Dealership">Dealership <a ng-click="sort_by('Dealership')"><i class="icon-sort" ng-show="pagedItems[currentPage].length > 1"></i></a></th>
<th width="15%" class="Satisfaction">Overall Satisfaction <a ng-click="sort_by('Satisfaction')"><i class="icon-sort" ng-show="pagedItems[currentPage].length > 1"></i></a></th>
<th width="15%" class="Loyalty">Loyalty <a ng-click="sort_by('Loyalty')"><i class="icon-sort" ng-show="pagedItems[currentPage].length > 1"></i></a></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in pagedItems[currentPage] | orderBy:sortingOrder:reverse">
<td>{{item.Rank}} - {{item.$$hashKey}}</td>
<td>{{item.Interviews}}</td>
<td>{{item.Dealership}}</td>
<td>{{item.Satisfaction | number:1}}</td>
<td>{{item.Loyalty}}</td>
</tr>
</tbody>
I am sorting initially with Rank :
Angular Controller Code :
$scope.sortingOrder = sortingOrder;
$scope.reverse = false;
Result in Firefox : Rank Column shows Rank with Hashkey value
Chrome Result : Rank Column shows Rank with Hashkey value
Here I am sorting with Rank. The Data with Same Rank gets sorted after their $$hashkey. Firefox gives $$hashkey in order it gets data. where as Chrome palce the second record to last in giving hash key.
I am not able to understand why this is happening. is there any way i can avoid.
Thanks in advance.
I had the same problem in Google Chrome. The remedy was to set the initial sort field upon page load.
I was not doing that previously:
I changed the above to this: