0👍
Why don’t you just create a preview component with a template and add the content there.
HTML
<preview v-if="displayme">{{{content}}}</preview>
<template id="preview">
<div>
<slot></slot>
</div>
</template>
If that isn’t possible because of components. Here is an extended discussion on the compile function https://github.com/vuejs/Discussion/issues/254.
But notice this comment where it is suggested that you use repeats to create new components on the fly. See if you can use v-for
to create the list of components and this will get you around the HTML compilation issue.
- [Vuejs]-Multiple entry web routes in laravel and vue SPA app
- [Vuejs]-Not able to retrieve data from JSON object in Vue
Source:stackexchange.com