Edit in Plunker

    <div ng-controller="ExampleController">
      <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>

    angular.module('orderByExample', [])
      .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
        var orderBy = $filter('orderBy');
        $scope.friends = [
          { name: 'John',    phone: '555-1212',    age: 10 },
          { name: 'Mary',    phone: '555-9876',    age: 19 },
          { name: 'Mike',    phone: '555-4321',    age: 21 },
          { name: 'Adam',    phone: '555-5678',    age: 35 },
          { name: 'Julie',   phone: '555-8765',    age: 29 }
        ];
        $scope.order = function(predicate, reverse) {
          $scope.friends = orderBy($scope.friends, predicate, reverse);
        };
        $scope.order('-age',false);
      }]);

d not exceed the maximum size of input array', function() { numLimitInput.clear(); numLimitInput.sendKeys('100'); letterLimitInput.clear(); letterLimitInput.sendKeys('100'); expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); });
clear(); searchAny.sendKeys('i'); expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); }); it('should use a equal comparison when comparator is true', function() { var searchName = element(by.model('search.name')); var strict = element(by.model('strict')); searchName.clear(); searchName.sendKeys('Julie'); strict.click(); expectFriendNames(['Julie'], 'friendObj'); });