Permalink
Browse files

add orderby

  • Loading branch information...
1 parent 0a710c9 commit 9f660372fa22f12546d806471707d891b972efc4 @mikepmunroe committed Feb 22, 2014
Showing with 3 additions and 1 deletion.
  1. +2 −0 app/scripts/controllers/lift.js
  2. +1 −1 app/views/partials/main.html
@@ -6,4 +6,6 @@ angular.module('fitrecordMeanApp')
$http.get('lifts/lifts.json').success(function(data) {
$scope.lifts = data;
});
+
+ $scope.orderProp = 'load';
}]);
@@ -4,7 +4,7 @@
<div ng-controller="LiftCtrl">
<ul>
- <li ng-repeat="lift in lifts">
+ <li ng-repeat="lift in lifts | orderBy:orderProp">
{{lift.name}} | {{lift.repScheme}} | {{lift.load}}
</li>
</ul>

0 comments on commit 9f66037

Please sign in to comment.