Closed sarahdayan closed 6 years ago
Hi! Technical limitation, since that happens out of the context of this plugin, just in plain Vue.
In Vue you have to use v-html
in order to interpret html:
export default {
data() {
return {
myVar: `<em>Hello</em>`
}
},
computed: {
template() {
return `<my-component><div v-html="myVar"></div></my-component>`
}
}
}
When using HTML directly in
template
, it's properly interpreted. When returning content with HTML from data/a method/a computed property, it's not.In other words, this works:
But this doesn't:
Is this a bug or is it a technical limitation? And if this is the latter, is there a way around it?
Thanks in advance!