Way to ng-repeat defined number of times instead of repeating over array?

Update (9/25/2018) Newer versions of AngularJS (>= 1.3.0) allow you to do this with only a variable (no function needed): <li ng-repeat=”x in [].constructor(number) track by $index”> <span>{{ $index+1 }}</span> </li> $scope.number = 5; This was not possible at the time the question was first asked. Credit to @Nikhil Nambiar from his answer below for … Read more