0
我有一個問題。我試圖使用Angular.js對錶列表進行排序,但它不像那樣發生。我在下面解釋我的代碼。無法按照要求使用Angular.js正確排序表列表
<tbody id="detailsstockid">
<tr ng-repeat="c in clickSummary | orderBy:['-total','+rest_name']">
<td>{{$index+1}}</td>
<td>{{c.rest_name}}</td>
<td>{{c.page_hit}}</td>
<td>{{c.map_hit}}</td>
<td>{{c.gallery_hit}}</td>
<td>{{c.phone_hit}}</td>
<td>{{c.web_hit}}</td>
<td>{{c.total}}</td>
</tr>
</tbody>
在這裏,我需要對列表進行排序按total and rest_name filed
。我需要在降序排序按總列值,如果總共有列相同的值,那麼就應該在排序按rest_name
。但我我得到如下的輸出。
在這張圖片中,你可以看到一個具有總列值11
但最後這應該是來fast.Please幫我來了。
到這裏看看:http://stackoverflow.com/questions/16764177/angular-orderby-number-sorting-as-text-in-ng-repeat –