【发布时间】:2017-12-22 11:35:35
【问题描述】:
我有一个要使用 Angular 显示的 python 列表。超过 200 个对象的整个列表显示在单个表格行中。如何让它显示在多行中?
List=[1,2,3,4,5, .......100}
我的 HTML:
<table>
<tr>
<ng-container *ngFor="let item of List">
<td>
{{item}}
</td>
</ng-container>
</tr>
</table>
当前输出:
1,2,3,4,5, ........100
需要:
1,2,3,4,......20
21,22,........40
41............60
61............80
81...........100
我需要将 td 数据换行到下一行,而不是在同一行中溢出。
【问题讨论】:
-
@VasudeDeshpande 尝试编辑解决方案。它将为您服务
标签: python html angular html-table