AngularJS: 'Template for directive must have exactly one root element' when using 'th' tag in directive template

后端 未结 12 1141
梦如初夏
梦如初夏 2020-12-30 19:50

I\'m trying to implement custom sortBy directive in order to make columns in html table sortable.

HTML:


   
            


        
12条回答
  •  一生所求
    2020-12-30 20:19

    I got this error when I used the template property of the directive definition when I should've been using templateUrl if that helps anyone.

提交回复
热议问题