gpt4 book ai didi

node.js - 如何重复(添加循环)具有 Angular 内容的 html 元素

转载 作者:太空宇宙 更新时间:2023-11-04 01:43:21 24 4
gpt4 key购买 nike

我想使用 Angular 或 Node.js 重复以下代码块

<div class="test-item col-sm-6">
<div class="col-sm-4">
<img class="img-responsive" src="../../../../assets/image/ngozi.png">
</div>
<div class="col-sm-8">
<p>"Definitely worth the investment. Without sancoj, we would have gone bankrupt by now."</p>
<div>
<i class="material-icons checked">star</i>
<i class="material-icons checked">star</i>
<i class="material-icons checked">star</i>
<i class="material-icons checked">star</i>
<i class="material-icons checked">star</i>
</div>
</div>
</div>

一些想法?

最佳答案

尝试使用*ngFor,有关更多详细信息,请参阅 Angular 文档here ,

<div class="test-item col-sm-6">
<div class="col-sm-4">
<img class="img-responsive" src="../../../../assets/image/ngozi.png">
</div>
<div class="col-sm-8">
<p>"Definitely worth the investment. Without sancoj, we would have gone bankrupt by now."</p>
<div>
<i class="material-icons checked" *ngFor="let star in stars">{{star}}</i>
</div>
</div>
</div>

关于node.js - 如何重复(添加循环)具有 Angular 内容的 html 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52288286/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com