12

I use like this to loop number:

<select>
  <option ng-repeat="n in [] | range:10" value="{{$index+1}}">{{$index+1}}</option>
</select>

This works, but how i can get like this with ng-reapet (5 to 10)?

<select>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
tshepang
  • 12,111
  • 21
  • 91
  • 136
a.fauzi
  • 163
  • 1
  • 2
  • 11

1 Answers1

11

What about

<select>
  <option ng-repeat="n in [] | range:6" value="{{$index+5}}">{{$index+5}}</option>
</select>
Alexander Nenkov
  • 2,910
  • 20
  • 28