我正在尝试为用户界面上的下拉按钮之一预先选择一个默认选项。它对于一个下拉列表工作正常,但是另一个下拉列表未在用户界面上设置默认值。下面是代码。
<div [style.width.%]="17" class="dropdown-component margin-right-2">
<label for="filetype" class="dropdown-label">File Type</label>
<select class="select-box dropdown-values" #fileType="ngModel" required id="filetype" name="fileType" ng-model="fileType" [(ngModel)]="searchCriteria1.fileType" (change)="onFileTypeChange($event.target.value)" [ngStyle]="{'background-image': 'url(' + dropdownArrowUrl + ')'}">
<option selected="selected" value="EPPRC">EPPRC</option>
</select>
</div>
<div [style.width.%]="17" class="dropdown-component margin-right-2">
<label for="fileversion" class="dropdown-label">File Type Version</label>
<select class="select-box dropdown-values" #fileVersion="ngModel" required id="fileversion" name="fileVersion" ng-model="fileVersion" [(ngModel)]="searchCriteria1.fileVersion" (change)="onFileVersionChange($event.target.value)" [ngStyle]="{'background-image': 'url(' + dropdownArrowUrl + ')'}">
<option selected="selected" value="1.01">V1.01</option>
</select>
</div>