Tuesday 15 April 2014

Angular js client side sorting

Angular js is providing a very easy way to do client side sorting. Here I am going to explain about a simple client side sorting.


<select ng-model="sortorder1">
 <option disabled value="">Choose one</option>
 <option value="name">Name</option>     
 <option value="age">Age</option>

 <li ng-repeat="datalist in datalists | orderBy:sortorder1">
 <div>Name : {{ datalist.name }} Age : {{ datalist.age }}</div> 



Here datalist is the json data ( $scope.datalists = data ;)


Play in fiddle

Related Posts

1. Angular ng-repeate in directive

2. Loop concept in angular js

3. Filtering concept in angular js

4. Show and Hide in angular

No comments :

Post a Comment