0

I'm using a vuetify application, App.vue looks like this

 <template>
  <v-app class="grey lighten-4">
    <nav>
      <Header/>
    </nav>
    <section><NavigationBar/></section>
    <v-content>
      <router-view></router-view>
    </v-content>
    <Footer/>
  </v-app>
</template>

This works perfectly. But I faced the situation, when I need to create an empty page, so I don't want load footer, header or bar. Is there any way to create a route for an empty page in this case?

1 Answer 1

1

Nested Routes

https://router.vuejs.org/guide/essentials/nested-routes.html

 <template>
  <v-app class="grey lighten-4">
 <router-view>
    <nav>
      <Header/>
    </nav>
    <section><NavigationBar/></section>
    <v-content>
      <router-view></router-view>
    </v-content>
    <Footer/>
 <router-view>
  </v-app>
</template>
Sign up to request clarification or add additional context in comments.

2 Comments

that looks very cool, thank you! But as I can see, this thing requires link changes too. For example if I have app/page1, app/page2 and I want to add app/newPage, there is no way. I need to do app/smth/page1, app/smth/page2 and app/newPage. Or am I wrong?
you can use v-if="!$route.name === 'abc'"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.