gpt4 book ai didi

javascript - 将 ng-repeat-start 和 ng-repeat-end 与 2 个不同的对象一起使用

转载 作者:行者123 更新时间:2023-11-29 21:08:04 25 4
gpt4 key购买 nike

我正在尝试为 ng-repeat-start 和 ng-repeat-end 使用 2 个不同的对象。

例如:

             <tr ng-repeat-start="file in files">
<td class="name-col">{{file.name}}<br>
</td>
<td class="name-col">{{file.progress}}</td>
</tr>
<tr ng-repeat-end="otherFile in otherFiles">
<td colspan="2">
{{otherFile.errors}}
</td>
</tr>

现在似乎不起作用,它只假定第一个对象(文件)

最佳答案

也许这样可以:

<tr ng-repeat-start="file in files">
<td class="name-col">{{file.name}}<br>
</td>
<td class="name-col">{{file.progress}}</td>
</tr>
<tr ng-repeat-end>
<td colspan="2">
{{otherFiles[ $index ].errors}}
</td>
</tr>

关于javascript - 将 ng-repeat-start 和 ng-repeat-end 与 2 个不同的对象一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43007173/

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