since iterating over a string it will render an item for each char:
<li ng-repeat = "k in 'aaaa' track by $index">
{{$index}} //THIS DOESN'T ANSWER OP'S QUESTION. Read below.
</li>
we can use this ugly but no-code workaround using the number|n decimal places
native filter.
<li ng-repeat="k in (0|number:mynumber -2 ) track by $index">
{{$index}}
</li>
this way we'll have mynumber
elements with no extra code. Say '0.000'
.
We use mynumber - 2
to compensate 0.
It won't work for numbers below 3, but might be useful in some cases.