Set ng-repeat to a variable

I have a mutable variable, and I need to repeat an element to the value of this variable. Is there a way to set ng-repeat to a set value (not objects or arrays).

(My actual code is much more complicated. Includes get the value from a js object via $http)

Answer

If I understand you correctly – the easiest way of achieve this would be to construct array based on variable and iterate over it.

ng-repeat="x in [].constructor(number) track by $index"

where number is your variable.