On Thursday, February 21, 2013 at 7:17:26 PM UTC, Alan Löffler wrote:
>
> I have a table with some data tacken from a mysql database, it looks like
> this -->
>
> <table class="table table-condensed table-hover">
> <thead>
> <tr>
> <th><a ng-click="predicate='counter';reverse=!reverse">#</a></th>
> <th><a ng-click="predicate='product';reverse=!reverse">Producto</a></th>
> <th><a ng-click="predicate='title';reverse=!reverse">Título</a></th>
> <th><a ng-click="predicate='city';reverse=!reverse">Ciudad</a></th>
> <th><a ng-click="predicate='state';reverse=!reverse">Provincia</a></th>
> <th><a ng-click="predicate='value';reverse=!reverse">Valor</a></th>
> </tr>
> </thead>
> <tbody>
> <tr ng-repeat="item in items | orderBy:predicate:reverse | filter:search |
> range:rangeModel" style="cursor: pointer;">
> <td>{{item.counter}}</td>
> <td>{{item.product}}</td>
> <td>{{item.title}}</td>
> <td>{{item.city}}</td>
> <td>{{item.state}}</td>
> <td>{{item.value | number}}</td>
> </tr>
> </tbody>
> </table>
>
> The problem is the order of the last row (called Valor), where I have a
> number data.
>
> Ascending order:
> 15,000
> 16,000
> 1,800
> 2,000
> 3,000
>
> Descending order:
> 3,000
> 2,000
> 1,800
> 16,000
> 15,000
>
> What I'm doing wrong? I can't figure it out.
> Thanks for the help!
>
please refer the link below which explains how to sort float values using
AngularJS
http://hubpages.com/technology/How-to-sort-table-content-filter-table-data-and-add-pagination-using-Angular-JS
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.