W wybranej opcji Jak zrobić domyślnie w kąt
<option [ngValue]="undefined" selected>Select</option>
Fancy Fly
<option [ngValue]="undefined" selected>Select</option>
<h3>AngularJs ng-options to Set Default Value</h3>
<select name="users" ng-options="user.name for user in arrlist" ng-model="userselected">
<option value="">--Select User--</option>
</select><br /><br />
<option [defaultSelected]="condition"> Default option here value</option>
condition must be true to select the input by default
To select for eg UK by default, we need to name the option et make the condition like this
<code><option [defaultSelected]="inputName.value==='UK' " #inputName>Default value</option> </code> to select UK by default
<option [defaultSelected]="condition"> Default option here value</option>
//condition must be true to select the input by default
//To select for eg UK by default, we need to name the option et make the condition like this
<code><option [defaultSelected]="inputName.value==='UK' " #inputName> Default value </option>
//to select UK by default and you must add the value attribute or use
<code><option [defaultSelected]="inputName.text==='UK' " #inputName> Default value </option>