Answers for "code to hide div using vuejs"

1

vue hide

<!-- there are two cases: -->
<!-- do you wanna keep it in the dom? -->
<div v-show="someBoolean">
  v-show
</div>

<!-- or remove it -->
<div v-if="someBoolean">
  v-if
</div>
Posted by: Guest on October-20-2021
-1

hide element vue

// to hide element in vue.js use v-if
  <div v-if="seen" id="hide">
      <p>hide me </p>
  </div>
</div>

new Vue({
data:{
    seen: true
}
});
Posted by: Guest on August-26-2021

Browse Popular Code Answers by Language