How to include context variable inside ui-template CSS

The {{ }} injection only works within the <template /> tags.

In order to assign a dynamic background-color, you can use Vue's dynamic binding like so:

<template>
    <span class="statusLabel" :style="{'background-color': msg.statusLabelColor}">{{msg.statusText}}</span>
</template>
1 Like