我有一个表格显示大量的数据,并导致浏览器卡住。显然,这是因为大量的数据被传递。在这张表中处理了10000多个数据。角度虚拟滚动(vs-reapt)不适用于表格
我试图使用“角度虚拟滚动”进行修复。但效果不佳。
<div class="col-md-8" id="events" vs-repeat="50">
<br/>
<table class="table">
<thead>
<th>Select</th>
<th>Date</th>
<th>Time</th>
<th>Log Information</th>
</thead>
<tbody vs-repeat>
<tr ng-repeat="s in events">
<!--<td style="display:none;">{{ s._id }}</td>-->
<td><input type="checkbox" ng-model="s.checked" ng-true-value="1" ng-false-value="0"></td>
<td>
<div >
<div class="">
<i ></i> {{ s.dat }}
</div>
</div>
</td>
<td>
<div >
<div >
{{ s.tim}}
</div>
</div>
</td>
<td>
<div>
<div >
{{ s.details}}
</div>
</div>
</td>
</tr>
</tbody>
</table>
控制器 -
$scope.events;
function getEventsOfUploadedFile()
{
Event.getUploadRead()
.success(function(event){
$scope.events=event;
})
.error(function (error) {
$scope.status = 'Unable to load event data: ';
});
}
谁能帮我解决这个问题。 感谢
我想你使用的setTimeout – Sandeep
见下文 – Sandeep