1

I am working on [email protected] version. I trying to use v-if, v-else-if..... but not work.

Example:

<div v-if="type === 'A'">
  A
</div>
<div v-else-if="type === 'B'">
  B
</div>
<div v-else-if="type === 'C'">
  C
</div>
<div v-else>
  Not A/B/C
</div>

It prints all condition values.

Does vuejs support v-elseif blocks in version 1?

1

1 Answer 1

1

As per official vue documentation v-else-if is added in 2.1.0+ version and you are using old version of vue.please update your vue version. Refer this: https://v2.vuejs.org/v2/guide/conditional.html#v-else-if

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.