Vue-i18n: Raw HTML - invalid expression for {{{ }}} in Vue 2.0

Created on 21 Oct 2016  路  2Comments  路  Source: kazupon/vue-i18n

As per the documentation and #18, I tried:

message: {
      hello: 'hello <br> world'
    }
<p>{{{ $t('message.hello') }}}</p>

But this gives me : template syntax error - invalid expression: {{{ $t('message.hello') }}}
Vue 2.0 is more picky on what is between the '{{{...}}}' then 1.0... or am I overlooking something ? Would v-html="rawHtml" help?
What is the alternative?

Most helpful comment

Ok.. .got it ... this works :

<div v-html="$t('home.header.title')"></div>

All 2 comments

Ok.. .got it ... this works :

<div v-html="$t('home.header.title')"></div>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jarikmarwede picture jarikmarwede  路  4Comments

koslo picture koslo  路  5Comments

forddyce picture forddyce  路  5Comments

zhaohaodang picture zhaohaodang  路  4Comments

karol-f picture karol-f  路  3Comments