<html>
<head>
    <title>CodeLinks</title>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
    <script src="app.js"></script>
</head>
<body ng-app="codeLinks" ng-controller="MainCtrl">
    <div>
      {{test}}
    </div>
    <div ng-repeat="post in posts">
      {{post.title}} - upvotes: {{post.upvotes}}
    </div>
</body>
</html>
<html>
<head>
    <title>CodeLinks</title>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
    <script src="app.js"></script>
</head>
<body ng-app="codeLinks" ng-controller="MainCtrl">
    <div>
      {{test}}
    </div>
    <div ng-repeat="post in posts | orderBy: '-upvotes'">
      {{post.title}} - upvotes: {{post.upvotes}}
    </div>
</body>
</html>
Add filter to sort by upvotes
Add filter to sort by upvotes
