So, I am using angular, and this is my select html:
<select id="date" ng-model="selectedDay" ng-change="setDate()" > <option>another option</option> <option>an option</option> </select>
this is in my controller:
$scope.selectedDay; document.getElementById("date").selectedIndex = "0";
Result: Three options: one empty (which is selected by default), and then two parameters that I made in html
What the hell? why is not the default when I open the view "another option"
source share