[Vuejs]-Conditional rendering – show div based on user select

0👍

This is basic vue functionality as mentioned @Samuil:

new Vue({data:{lang:''}}).$mount('div')
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div>
<select class="custom-select custom-select-sm" id="lang" v-model="lang">
  <option></option>
  <option value="1">English</option>
  <option value="2">Svenska</option>
</select>
<a class="nav-link" v-if="lang" href="#">People</a>
</div>

Leave a comment