I am enhancing a page in a web application using Vue. In the past I have written single file components and I've found it convenient to define the html template at the top of the file using a <template> tag.
Is there a way to use this tag when defining a Vue root instance? Or do I need to put a string in the template property of the Vue options object?
You can use the x-template syntax, like so
worth noting, if your editor doesn't understand html inside the x-template block you can use
text/htmlalso.You can also define a number of components in the page also. This is super useful when you are upgrading a page from plain html/js but can't fully change it over
Refer to: https://v2.vuejs.org/v2/guide/components-edge-cases.html#X-Templates