【发布时间】:2020-11-04 16:27:47
【问题描述】:
我在 Angular 8 和 10 开发的两个不同应用程序中有以下代码,它没有在 Angular 10 应用程序中显示选定的值,但在 Angular 8 应用程序中正确显示
<select [value]="10">
<ng-container *ngFor="let hour of hours">
<option [value]="hour">{{hour}}</option>
</ng-container>
</select>
这里 hours 是一个数组。
【问题讨论】: