<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Example - example-example57-production</title>
  

  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script>
  <script src="script.js"></script>
  

  
</head>
<body ng-app="orderByExample">
    <div ng-controller="Ctrl">
    <table class="friend">
      <tr>
        <th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
          (<a href="" ng-click="order('-name',false)">^</a>)</th>
        <th><a href="" ng-click="reverse=!reverse;order('phone', reverse)">Phone Number</a></th>
        <th><a href="" ng-click="reverse=!reverse;order('age',reverse)">Age</a></th>
      </tr>
      <tr ng-repeat="friend in friends">
        <td>{{friend.name}}</td>
        <td>{{friend.phone}}</td>
        <td>{{friend.age}}</td>
      </tr>
    </table>
  </div>
</body>
</html>