Display unescaped HTML in Vue.js

后端 未结 5 2105
孤城傲影
孤城傲影 2020-11-28 04:02

How can I manage to get HTML interpreted inside a mustache binding? At the moment the break (
) is just displayed/escaped.

Small Vue app:

5条回答
  •  情深已故
    2020-11-28 04:37

    Vue by default ships with the v-html directive to show it, you bind it onto the element itself rather than using the normal moustache binding for string variables.

    So for your specific example you would need:

提交回复
热议问题