In my code, I have a specific template that is displayed when a certain condition is met using a v-if
statement. In this template, I need to set a variable to N/A
, but I am struggling with how to accomplish this simple task.
<span v-if="selected==='Powergrid'" Multiplier="N/A">
I've tried various methods such as:
<span v-if="selectedSim==='Powergrid'">
{{Multiplier = 'N/A'}}
<span v-if="selectedSim==='Powergrid'">
<powergridMenu
@Outcome="selectedOutcome = $event"
@Threshold="outcomeThreshold = $event"
Multiplier="N/A"
/>
<span v-if="selectedSim==='Powergrid'">
<span Multiplier='N/A'></span>
Although I could write a method to achieve setting the variable, I believe there should be a simpler way to assign the value directly. Can you provide guidance on what I might be doing wrong?