Performance Test with ng-repeat
by Josh Carroll
HTML
<script src="http://code.angularjs.org/1.2.0-rc.3/angular.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script src="http://code.angularjs.org/1.2.0-rc.3/angular-route.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<div data-ng-controller="Ctrl as ctrl" class="container">
<table>
<tr class="fade-in-repeat" ng-repeat="transaction in transactions | orderBy: ['-product_id', '-time']">
<td>{{transaction | json}}</td>
</tr>
</table>
</div>
JavaScript
var Controllers;
(function (Controllers) {
var Ctrl = function (transactionService) {
};
Ctrl.$inject = [];
Controllers.Ctrl = Ctrl;
}(Controllers || (Controllers = {})));
var Services;
(function (Services) {
}(Services || (Services = {})));
(function () {
angular.element(document).ready(function () {
var module = angular.module('demo', []);
module.controller('Ctrl', Controllers.Ctrl);
module.service('commandService', Services.CommandService);
module.service('stateService', Services.StateService);
angular.bootstrap(document, ['demo']);
});
}());