Probleme mit der Auswahloption in angular2.Es ist nicht standardmäßig ausgewählt und sichtbar. Es funktioniert im IE-Browser, aber nicht in anderen Browsern.Angular2: "Select" -Option sollte standardmäßig ausgewählt und sichtbar sein
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>
Vielen Dank für Ihre Hilfe .. –