Is it possible to render a whole HTML document with a Vue component using
new Vue(el: "html with vue component")
instead of new Vue({el: "#app"})
?
Below is an example code snippet:
<div id="app">
</div>
<script>
Vue.component("c", {template: `<div>is c</div>`})
new Vue({el: "#app"})
// after initializing app
$("#app").append(parseVueComponent(`<c></c>`))
// I expect the result to be:
// <div id="app">
// <div>is c</div>
// </div>
// How can we implement parseVueComponent function?
</script>