Question

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>
Was it helpful?

Solution

What about

<select>
  <option ng-repeat="n in [] | range:6" value="{{$index+5}}">{{$index+5}}</option>
</select>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top