Is it possible to conditionally add a specific class using vue js?
In my DataStore, I have two values defined in TypeScript:
value1: 0 as number,
value2: 0 as number
Based on the values of value1 and value2, I want to apply the following classes in my template:
blue--text if value1 == value2
or
red--text if value1 != value2
For example:
<p class="blue--text">{{ value1 }}</p>
or
<p class="red--text">{{ value1 }}</p>
Does anyone know how to achieve this? Any suggestions would be greatly appreciated.