0
如何显示从selectBox
中选择的值。我无法使用ngModel
绑定属性,因为selectBox的数量正在动态变化。例如,我将有50个房间,因此每个selectBox
需要50个变量。有没有其他方式来做到这一点,或者我必须使用一组选定的值?这是我当前的代码:Angular 2 selectBox值
<tr *ngFor="let room of term.rooms">
<th>{{room.name}}</th>
<th><select #box><option *ngFor="let price of getPrices(room.id)" [ngValue]="price">{{price.name}}</option></select></th>
<th><!--ValueHere--></th><!--for example something like this price.value-->
</tr>
嗨,谢谢你的帮助。 :) –