Answer the question
In order to leave comments, you need to log in
How to call a function with parameter passing inside v-if?
Hello.
There is this code:
<li v-for="(todo, index) in todos">
<div v-if="index === 1">{{ todo.text }}</div>
</li>
<div v-if="isVisible(index)">{{ todo.text }}</div>
computed: {
isVisible(index) {
return index === 1;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question