I want manually run the ng-repeat
by hardcode number. I don't want to pass array
parameter. I have tried below code but It's does not work!
<h1 ng-repeat="x in 20">{{sumofTwendy(($index}})</h1>
So I have planed to create a dummy array in
controller
and assign value20
to length of that array. then I pass the array on `ng-repeat.
$scope.data=[];
$scope.data.length=20;
<h1 ng-repeat="x in data">{{sumofTwendy(($index}})</h1>
this is also does not working :( .
How can we run
ng-repeat
only by 20 times without passing array values?
let me know the solution if it angular 1 or angular 2?