パフォーマンスの問題があり、解決策が見つかりません。
コンテキスト: テーブルに大量のデータ (500 行、8 列) を表示する必要があります。このデータを表示するために、優れた機能を提供する Smart-table を使用することにしましたが、問題は、大量のデータがあり、データを表示する時間が非常に長いことです (5 ~ 9 秒、これはデバイスのパフォーマンスに依存します)。
重要なこと:すべてのデータを表示する必要があるため、ページネーション方法、制限フィルターは必要ありません。
したがって、このコードは機能しています:
<ion-scroll class="scrollVertical" direction="xy" overflow-scroll="true" >
<table st-table="tableaux" class="table table-striped">
<thead>
<tr>
<th ng-repeat="column in ColumnTable">{{column.Label}}</th>
</tr>
<tr>
<th ng-repeat="column in ColumnTable">
<input st-search="{{column.Id}}" placeholder="" class="input-sm form-control" type="search" ng-model="inputRempli"/>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in tableaux">
<td ng-repeat="column in ColumnTable" ng-init="colonne = column.Id">{{row[colonne]}}</td>
</tr>
</tbody>
</table>
</ion-scroll>
Ionic がディレクティブ ( collection-repeat ) を作成したことを読みました。これにより、アプリはアイテムの膨大なリストを ng-repeat よりもはるかに効率的に表示できます。だから私は自分のソリューションを collection-repeat で作り直そうとしましたが、うまくいきません...
コード コレクション - リピート ソリューション:
<ion-scroll class="scrollVertical">
<table st-table="tableaux" class="table table-striped">
<thead>
<tr>
<th ng-repeat="column in ColumnTable">{{column.Label}}</th>
</tr>
<tr>
<th ng-repeat="column in ColumnTable">
<input st-search="{{column.Id}}" placeholder="" class="input-sm form-control" type="search" ng-model="inputRempli"/>
</th>
</tr>
</thead>
<tbody>
<tr collection-repeat="row in tableaux" item-width="200px" item-height="100px">
<td collection-repeat="column in ColumnTable" ng-init="colonne = column.Id" item-width="100px" item-height="100px">{{row[colonne]}}</td>
</tr>
</tbody>
</table>
</ion-scroll>
エラー: 最大呼び出しスタック サイズを超えました
質問: 大量のデータを持つスマート テーブルのパフォーマンスを向上させる angularjs またはイオン ソリューションはありますか? collection-repeat の何が問題になっていますか?