在angular2中面临选择选项的问题。默认情况下,它未被选中并可见。它在IE浏览器中工作,但不在其他浏览器中。Angular2:应该选择“选择”选项,默认情况下是可见的
country.html:
<label class="control-label col-sm-offset-1 col-sm-2 bodySmall" for="country">Country:</label>
<div class="col-sm-3" [ngClass]="{ 'has-error': country.errors && (country.dirty || country.touched)}">
<select class="form-control bodySmall" id="country" [(ngModel)]="model.country" name="country" #country="ngModel" required>
<!--required-->
<option value="" selected="selected">--Please select a Country--</option>
<option *ngFor="let c of countries" [value]="c">{{c}}</option>
</select>
<div *ngIf="country.errors && (country.dirty || country.touched)" class="help-block">
<div [hidden]="!country.errors.required">Country is required.</div>
</div>
</div>
泰勒感谢您的帮助.. –