Angular 2: Select dropdown not selecting option despite “selected” attribute
问题 I have the following code for a select dropdown: <select id="UnitOfMeasurementId" name="UnitOfMeasurementId" [(ngModel)]="UnitOfMeasurementId"> <option *ngFor="let unit of UnitOfMeasurements" [ngValue]="unit.Value" [selected]="unit.Selected">{{unit.Text}}</option> </select> Each item in the UnitOfMeasurements array looks something like this: Selected: false Text: "lb" Value: "1" Or this: Selected: true Text: "kg" Value: "3" [(ngModel)]="UnitOfMeasurementId" contains the value of the item that