I need to display something x times in the row, but there is no do(x times) in Angular, nor I would like to use additional functions in my controller.
Knowing that
?Array.from({length:5})
(5) [undefined, undefined, undefined, undefined, undefined]
Is it possible make the following code work without adding additional functions or filters in the controller (without using a controller at all).
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js">
</script>
<div ng-app>
[1,2] - OK:
<div ng-repeat="x in [1,2]">
> {{x}}
</div>
Array.from({length:5}) - NOK:
<div ng-repeat="x in Array.from({length:5})">
> {{x}}
</div>
</div>
PS
I don't want to display numbers, I just need to display 5 >
PPS.
Practical need:
I need to display the last page of a paginated table, have "availableRowsNumber" and "itemsPerPage", so I need to complete with empty rows, to display the "standard height":
<div ng-repeat="x in Array.from({length:itemsPerPage-itemsPerPage%availableRowsNumber})">
<tr></tr>
</div>
ng-repeat?