Display Only Available Data in Vue.js and Nuxt

Share this video with your friends

Send Tweet

You often need to hide elements based on various conditions of your data. This lesson walks you through hiding the comments when no comments are available.

Julio
Julio
~ 6 years ago

It's needed to wrap the elements in a template to add the v-if?. can't it be directly in the element?

Artem Pasichnyk
Artem Pasichnyk
~ 6 years ago

As there is only one element, v-if can be added on it. Template element used to apply condition on group of elements.