ng重复奇怪的行为

ngRepeat weird behaviour

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

{"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>

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

它正确显示了密钥,但未能在列表中迭代,因此名称未显示,控制台中也未显示任何错误

谢谢

你的问题的底线:

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> 并且有效