gpt4 book ai didi

html - ng-在表列上重复

转载 作者:太空狗 更新时间:2023-10-29 15:25:55 25 4
gpt4 key购买 nike

所以我有一个从休息服务返回的列表。现在,我想以列格式显示此对象,现在在第一行。所以它会是这样的:

 firstName:   Bob              Alice
LastName: Doe Joe
EmailId: bob@xyz.com alice@abc.com
ContactNo: 123123 12444

那么我如何在这里使用 ng-repeat:

  <tr> 
<th>firstName:</th>
<td>('Name should be displayed here')</td>
</tr>

最佳答案

您可以在 td 元素上使用 ng-repeat。

<tr>
<th>firstName:</th>
<td ng-repeat="person in people">{{person.firstName}}</td>
</tr>
<tr>
<td ng-repeat="person in people">{{person.lastName}}</td>
</tr>

关于html - ng-在表列上重复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25695418/

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