gpt4 book ai didi

angularjs - ng-switch-when 与 ng-repeat

转载 作者:行者123 更新时间:2023-12-04 13:03:06 25 4
gpt4 key购买 nike

我的 HTML 代码是

<tr ng-switch-when="true" ng-repeat="onlineCredentials in onlineCredentialDetails" >
<td>
<span>Ordering Mode: </span>{{onlineCredentials.mode}}<br />
<span>Intermedtiary Group: </span>{{onlineCredentials.name}}
</td>
<td>
<span>Website: </span>{{onlineCredentials.webSite}}
</td>
<td >
<span>Username / Password</span>
<div ng-repeat="cred in onlineCredentials.loginDetails">
-&nbsp;{{cred.userName}}&nbsp;/&nbsp;{{cred.password}}
</div><br />
</td>
</tr>

哪个不是绑定(bind)数据...(存在 TD 和文本,但绑定(bind)属性值为空)

如何一次使用 ng-switch-when 和 ng-repeat?

提前致谢

最佳答案

这是设计使然。请看 https://stackoverflow.com/a/15434085/1264360 .基本上要修复,您需要在 ng-repeat 上方的元素中使用 ng-switch-when。

关于angularjs - ng-switch-when 与 ng-repeat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23495052/

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