gpt4 book ai didi

angularjs - ng重复奇怪的行为

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

我无法相信我无法完成由两个数组组成的简单对象

{"M":
[
"Alpha",
"Beta",
"Zeta"],
"F":
[
"Alpha",
"Omega"
]}

我想做的就是像下面这样嵌套 ng-repeat

        <a 
class="list-group-item list-group-item-info"
ng-repeat="(key,list) in vm.result">

{{key}}

<a
class="list-group-item"
ng-repeat="name in list">
{{name}}
</a>
</a>

任何人都知道为什么它不起作用。

它正确显示了 key ,但未能在列表中迭代,因此没有显示名称,也没有在控制台中显示错误

谢谢

最佳答案

问题的底线:

https://www.w3.org/TR/html401/struct/links.html#h-12.2.2

nested links are illegal

Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements.

Since the DTD defines the LINK element to be empty, LINK elements may not be nested either.

将外部元素更改为 <div><span>并且有效

关于angularjs - ng重复奇怪的行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38328923/

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