In short, I do not know what it is connected with, but if you use smart teible
and write like that
$scope.itemsByPage = 15; $scope.rowCollection = []; $scope.displayed=[]; $http.get('get.json') .success(function (result) { var rowCollection = result.aaData; $scope.rowCollection = rowCollection; });
then in the view
<table st-table="displayed" st-safe-src="rowCollection" class="table table-striped"> <thead> <tr> <th st-sort="firstName">first name</th> <th st-sort="lastName">last name</th> <th st-sort="birthDate">birth date</th> <th st-sort="balance">balance</th> <th>email</th> </tr> <tr> <th> <input st-search="firstName" placeholder="search for firstname" class="input-sm form-control" type="search"/> </th> <th colspan="4"> <input st-search placeholder="global search" class="input-sm form-control" type="search"/> </th> </tr> </thead> <tbody> <tr ng-repeat="row in displayed"> <td>{{row.name | uppercase}}</td> <td>{{row.lastName}}</td> <td>{{row.birthDate| date}}</td> <td>{{row.balance| currency}}</td> <td><a ng-href="mailto:{{row.email}}">email</a></td> </tr> </tbody> <tfoot> <tr> <td colspan="5" class="text-center"> <div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7"></div> </td> </tr> </tfoot> </table>
then the download of 8362 elite takes no more than 3 seconds and the browser does not freeze. If you do in the form of a test
for (var j = 0; j < 200000; j++) { $scope.rowCollection.push(generateRandomItem(j)); }
it loads literally instantly.
The whole catch was in what I wrote st-table = "rowCollection" and then ng-repeat = "row in rowCollection" and it was necessary so that st-table = "displayed" st-safe-src = "rowCollection" and then ng -repeat = "row in displayed " What is the catch yet have not read but if someone will search I will be grateful
$scope.rowand why is there apush, not an assignment? - Qwertiy ♦