假设我有非常大的单元格网格,我想添加数据行和数据列属性值并从模型绑定。如何绑定来自 Angular2(Dart 中的 beta0)的数据行。
与 data-row="{{boundVal}}" 的绑定似乎不起作用。
(输出 html 中没有出现数据属性)
eg.
<table>
<tr *ngFor="#row of rows" >
<td *ngFor="#cell of row.cells" data-row="{{row.index}}" data-col="{{cell.index}}" >
</td>
</tr>
</table>
这应该做你想做的
[attr.data-row]="row.index" [attr.data-col]="cell.index"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)