How to use labels inside loops with AngularJS

后端 未结 3 788
陌清茗
陌清茗 2021-02-02 06:01

So I\'m inside an ng-repeat like this:

  • 3条回答
    •  花落未央
      2021-02-02 06:33

      Since ng-repeat provides a new scope object on each iteration, I prefer using something like

    • The advantage of this method is that you are guranteed not to have a duplicate selector with same id on the document. Duplicates could otherwise easily arise when routing or animating.

    提交回复
    热议问题