ng-repeat inside UL (which is inside a P) is not working

前端 未结 2 573
你的背包
你的背包 2021-01-12 08:57

UPDATE: It seems Angular.js doesn\'t like the

    inside a

    . So, as helpful commenters said, replacing the

    with a

    solves the
    相关标签:
2条回答
  • 2021-01-12 09:46

    You were using <ol> tag inside <p> tag. According to Html documentation List elements (in particular, ol and ul elements) cannot be children of p elements.

    So change <p ng-repeat=""> to <div ng-repeat=""> or <span ng-repeat="">

    See this question in stack overflow Should ol/ul be inside <p> or outside?

    0 讨论(0)
  • 2021-01-12 09:48

    At first I thought it was simple...

    Then it drove me crazy...

    The solution: Change the <p ng-repeat="..."> to <div ng-repeat="...">. Then it works; why, I do not know...

    0 讨论(0)
提交回复
热议问题