0

I have a problem in selecting the default value of the select option when I try to load the page,this is my code:

<select ng-model="sortKey" class="ng-valid ng-pristine">
<option value="LastName" selected="selected">Nom</option>
<option value="FirstName">Prenom</option>
<option value="Class">Classe</option>
</select>

I have used the selected="selected" attribute but always I have this problem

enter image description here

Thanks for help

this is a demo:

<select ng-model="sortKey" style="border-radius: 20px;width: 135px;height: 32px;margin-left:     0px;margin-right: 22px;" class="ng-valid ng-dirty ng-pristine">
  <option selected value="LastName" >Nom</option>
  <option value="FirstName">Prenom</option>
  <option value="Class">Classe</option>
</select>
miratum
  • 177
  • 1
  • 2
  • 13

0 Answers0