alexjoverm / v-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
605 stars 72 forks source link

Template allows multiple children but renders only the first #36

Closed snshn closed 5 years ago

snshn commented 5 years ago

This happens with no warning and took me a minute to debug without error/warning messages in the console.

In a nutshell, if template: "<b>a</b>" then it's all good, but if template: "<a>b</a><b>a</b>", then only the first node (<a>b</a>) will be rendered, with no warning regarding wrapping templates into one root node being a requirement.

alexjoverm commented 5 years ago

Yes, there must be one single root component just as Vue templates