My application loops through a list of vegetable crops and displays disease keys and links to control measures for each crop.
For one of the crops (cropid=6), no disease key exists and I cannot stop showing that specific link.
The relevant parts of my code are as follows:
Diseases
My data part is as follows:
diseases: [ { link: "disease key", id: "k", path: "key" }, { link: "disease controls", id: "d", path: "control" }, ],
How do I stop displaying the "disease key" link if cropID=6?
Thank you/Tom
For conditional display, you need to use
v-if
. Assumingdisease.id
is similar tocropId
, you can use the following code: