How do I create a callback for ng-repeat orderBy?
问题 Looking for a way to get AngularJS'a ng-repeat orderBy filter to do a callback once it's done rendering... Markup: <div ng-controller="MyCtrl"> <table> <thead> <tr> <th ng-click="sort('name')">Name:</th> <th ng-click="sort('age')">Age:</th> </tr> </thead> <tbody> <tr ng-repeat="item in items | orderBy:sortColumn:reverseSort"> <td>{{item.name}}</td> <td>{{item.age}}</td> </tr> </tbody> </table> </div> JS: var myApp = angular.module('myApp', []); function MyCtrl($scope) { $scope.items = [{