[Vuejs]-Unclosed String Literal – Vue JS Template simple concatenation

1👍

The curly brackets interpret the data as plain text. For HTML use the v-html directive:

<div v-else v-html="remainingHtml">
computed : {
  remainingHtml () {
    return remaining.hours > 0 ? (remaining.hours < 10 ? '0' : '') + remaining.hours + '<span class="colon">:</span>' : '' :
  }
}

https://v2.vuejs.org/v2/guide/syntax.html

Leave a comment