directive not working inside that is ng-repeat bound

前端 未结 2 1825
小蘑菇
小蘑菇 2021-01-02 04:42

I have a table where the rows are repeated via ng-repeat. I am trying to create a template that generates columns for each row <

2条回答
  •  不知归路
    2021-01-02 05:22

    As pointed out in comments the template of a directive should have single root element. So I would suggest you to move the tr element to the template of the directive, like this: http://plnkr.co/edit/YjLEDSGVipuKTqC2i4Ng?p=preview

提交回复
热议问题