Angular 如何以角度重复一个div N次
我没有任何对象可以使用,我希望它在AngularJS或任何其他框架中,而不是AngularJS。请确保您的解决方案支持最新版本。{{item}尝试以下操作: 打字稿:Angular 如何以角度重复一个div N次,angular,Angular,我没有任何对象可以使用,我希望它在AngularJS或任何其他框架中,而不是AngularJS。请确保您的解决方案支持最新版本。{{item}尝试以下操作: 打字稿: <div ng-repeat="10">Text</div> HTML: 在.ts文件中:-> <div *ngFor="let item of fakeArray(10);"></div> in.html:-> nth_time = [1,2,3,4,5,6,7,8,9,10]
<div ng-repeat="10">Text</div>
HTML:
在.ts文件中:->
<div *ngFor="let item of fakeArray(10);"></div>
in.html:->
nth_time = [1,2,3,4,5,6,7,8,9,10];
我希望这将对您有所帮助。您使用的是哪个版本的angular?
nth_time = [1,2,3,4,5,6,7,8,9,10];
<div *ngFor="let time of nth_time">{{time}}</div>