My App.vue contains below content:
<template>
<v-app>
<core-toolbar />
<core-drawer />
<core-view />
</v-app>
</template>
But I want to hide <core-toolbar /> and <core-drawer /> when it is routed to login page. I am planning to use v-if to hide them. But how can I check whether the current route is login?
vue-router, the app component (v-appin this case) should contain arouter-view. Updating the route causesvue-routerto render a specific view component into therouter-view(e.g., it renders aLoginViewcomponent for the/loginroute). You could just omit thecore-toolbarandcore-drawercomponents fromLoginViewinstead of usingv-if.