IF – Else statement in Vue.js

Let’s try to understand how to write IF-Else statement in Vue js. You have v-if,v-else-if,v-else

This is your Vue instance for this example

You can use v-show directive to display HTML element if some condition is true. I need to show message when user select more then one check box

“You have selected multiple days”

 

When user select more than one check box above messsage will be displayed as shown in below image

You can write the IF-Then staement like below

Leave a Reply

Your email address will not be published. Required fields are marked *