我想更新表单页面上的插值文本,并且当用户在表单页面中选择新值时也要重新计算值
<div class="form-group row">
<label for="unitlabel" class="col-sm-2 col-form-label">Units</label>
<select name="Units"
[(ngModel)] = "units"
(onTouched)="updateUnits()">
<option value="US" selected>US</option>
<option value="Metric">Metric</option>
</select>
</div>
答案 0 :(得分:1)
参加change
事件
<select name="Units"
[(ngModel)] = "units"
(change)="updateUnits()">