【发布时间】:2017-04-07 16:19:35
【问题描述】:
我正在尝试在 Angulardart 中构建一个表示 List<List<int>> 的表。
这是我的模板文件的内容:
<table>
<tbody>
<tr *ngFor="#row of cells">
<td *ngFor="#cell of row">
<input type="number" #cell (keyup)="0"/>
</td>
</tr>
</tbody>
</table>
并且列表是这样初始化的:
class Grid {
const GRID_SIZE = 9;
List<List<int>> cells = new List(GRID_SIZE);
Grid() {
cells.forEach((x) => x = new List(GRID_SIZE));
}
}
但是,在呈现的 HTML 中,我只看到 9 个 <tr> 空标签,里面没有 <td>s。
我错过了什么?
【问题讨论】:
标签: html dart angular-dart