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

后端 未结 12 1143
梦如初夏
梦如初夏 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:28

    I have encountered the issue couple of times and most of the times it could be that you are not wrapping your elements under one element like

    But there was one occasion where you get this error when the template path is not correct. So please check if you are referring to the template correctly.

提交回复
热议问题