Output HTML from VueJS filter

Just a quick post to show you how to output HTML out of a filter in VueJS. Normally you would do something like this :

<div v-html="someValue | myAwesomeFilter" />

But it won't work because your output will be treated as a text node. To solve this you could :

<div :inner-html.prop="someValue | myAwesomeFilter" />

It's not sexy, but it works !


Try out my latest game !

Screenshot of solitaire game