Check nuxt-child is empty or not

Viewed 784

Is there any way to check nuxt-child or native router-view has childs or not? for instance I wanted to show a div if nuxt-child was empty/or didn't not set.

<div v-if=" nuxt-child == null ">
   Choose something to start...
</div>

<nuxt-child />

Any ideas?

1 Answers

You can check the matched components for the routes.

<div v-if="this.$route.matched.length">
   Choose something to start...
</div>
Related