【发布时间】:2018-04-27 07:49:37
【问题描述】:
这是我的代码
<select class="form-control input-transparent" id="select-field" name="address" ngModel required>
<optgroup *ngFor="let wallet of wallets" label="{{wallet.label}}">
<option value="{{ wallet.address }}" [selected]="wallet.address == wallets[0].address">{{ wallet.address }}</option>
</optgroup>
</select>
我想选择第一个选项,但仍选择默认值
【问题讨论】: