Template must have exactly one root element with custom directive replace: true

前端 未结 4 1934
醉酒成梦
醉酒成梦 2021-02-01 09:35

I am having issues with a custom directive with replace: true,

http://jsbin.com/OtARocO/2/edit

As far as I can tell, I do only have one root element, my , what i

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 10:01

    Watch out with comments in directive templates as well! docs

    Watch out for html comments at the beginning or end of templates, as these can cause this error as well. Consider the following template:

提交回复
热议问题