Display unescaped HTML in Vue.js

后端 未结 5 2109
孤城傲影
孤城傲影 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:33

    You can read that here

    If you use

    {{
    }}

    it'll be escaped. If you want raw html, you gotta use

    {{{
    }}}

    EDIT (Feb 5 2017): As @hitautodestruct points out, in vue 2 you should use v-html instead of triple curly braces.

提交回复
热议问题