javascript - 重复字体真棒图标导致潜在的角度内存不足崩溃[不是特定于浏览器]
问题描述
我在 ngFor 循环中使用 font-awesome 5 图标,当我从服务器接收到大量数据时,浏览器会暂停。如果我不在循环中使用 font-awesome 图标,一切正常。如何使用图标并避免潜在的内存不足崩溃?问题在所有非 chrome 特定的浏览器上仍然存在。请检查下面的图片是否有错误。
代码:
<tr *ngFor="let data of someList| orderBy: {property: column, direction: direction}; let $index= index" (click)="takeMesomeWhere(data.number, data.cafe)">
<td>{{ data.number }}</td>
<td>{{data.cafe}}</td>
<td>{{data.itemDes}}</td>
<td class="text-center align-middle cursor-pointer" style="color:red">
<i class="fas fa-times" aria-hidden="true"></i>
</td>
// if I remove the above td element, which contains font-awesome icons, everything works fine
</tr>
解决方案
推荐阅读
- sql-server - SQL Server 日期数据类型变为 nvarchar
- android - AndroidStudio 中的非法 main-dex-list 条目
- asp.net-core - Aspnetcore:如何发布松散耦合的项目?
- python - 自动优化 Pandas Dtypes
- javascript - 最后以空值排序
- widget - 使用 Drupal hook_form_alter 有条件地更改字段小部件类型
- java - 如何使用 oracle jdk 8 安装 tomcat 本机
- java - 对象引用未保存的瞬态实例 - 在刷新休眠 JPA 之前保存瞬态实例
- deep-learning - 如何对抗机器学习数据集中的不平衡类
- r - 如何将物种箭头/向量添加到排序图中