Why does ng-selected not work with ng-repeater?

Why is this repeater broken

<select name="quarter" ng-model="Quarter" ng-selected="Quarter" >
    <option ng-repeat="v in [1,2,3,4]" value="{{v}}">Q{{v}}</option>
</select>

But not the handwritten way?

<select name="quarter" ng-model="Quarter" ng-change="onQuarterChange()" ng-selected="Quarter">
    <option value="1">Q1</option>
    <option value="2">Q2</option>
    <option value="3">Q3</option>
    <option value="4">Q4</option>
</select>

stick with ng-options

<div ng-app>
  <h2>Todo</h2>
  <div ng-controller="QuarterController">
    <select name="quarter" ng-model="Quarter" ng-options="obj.value as obj.text for obj in [{'value': 1,'text' : 'Q1'},{'value':2,'text':'Q2'},{'value':3,'text':'Q3'},{'value':4,'text':'Q4'}]">
    </select>
  </div>
</div>

function QuarterController($scope) {
    $scope.Quarter = 2;
}   

http://jsfiddle.net/hDNsm/3/

you might as well define the array in your controller

Notice two things:

  1. 'ng-selected' directive should be written on the 'option' element and not on the 'select' element.

  2. the content of the 'ng-selected' attribute should be a condition in which the option is selected. a simple example for this could be if the value of the option equals the select model.

Your code should be something like this:

<select name="quarter" ng-model="Quarter">
    <option ng-repeat="v in [1,2,3,4]" value="{{v}}" ng-selected="v==Quarter">Q{{v}}</option>
</select>