4
是否有一種方法可以動態設置ngModel的值?例如在Angular2中動態設置ngModel值
<h1>please fill the text</h1>
<div *ngFor="#value of columnsNames">
{{value }}<input type = "text" [(ngModel)]="SomeDynamicValue">
</div>
是否有一種方法可以動態設置ngModel的值?例如在Angular2中動態設置ngModel值
<h1>please fill the text</h1>
<div *ngFor="#value of columnsNames">
{{value }}<input type = "text" [(ngModel)]="SomeDynamicValue">
</div>
<div *ngFor="#value of columnsNames">
{{value }}<input type = "text" [(ngModel)]="SomeDynamicValue[value]">
</div>
您可以通過使用控制器 – Afsar
能否請您解釋給我,我怎麼能做到這一點做呢? – Maryam