我正在处理一个表,在那里我需要应用只能与header contains throw dynamic一起使用的数据可见性。如何做到这一点?
下面是我的例子:
columns = ['name', 'age']; //required fields declared. on change I need to update the data as well
html:
<table>
<tr>
<th *ngFor="let col of columns">{{col}}</th>
<
我正在构建一个angular应用程序,我将在其中添加一个项目到表中。添加的行将基于输入的项目名称及其数量。
例如,如果选择3作为数量的苹果,我将期望在表中显示一个包含苹果和3的列。
按下add按钮后,确实创建了一行,但是条目"apples“和3没有出现。
根据控制台输出,我在第66行得到"No value accessor for form control with name:'object Object'“。
这是第66行:
<td><label [(ngModel)]="item.name" class="form-