<div ng-repeat="10">Text</div>
I don't have any object to use and I want it in Angular, not AngularJS or any other framework. Please make sure your solution support the latest Angular.
Try like this:
Typescript:
fakeArray(length: number): Array<any> {
if (length >= 0) {
return new Array(length);
}
}
HTML:
<div *ngFor="let item of fakeArray(10);"></div>
in .ts file:->
nth_time = [1,2,3,4,5,6,7,8,9,10];
in .html:->
<div *ngFor="let time of nth_time">{{time}}</div>
i hope this will help you.