Reputation: 322
I would like to hide 2 components (AppBar & NavigationDrawer) included on my App.vue from some routes like /login.
I already included this in my NavigationDrawer.vue but it's disabling the component on every routes :
<v-navigation-drawer
permanent
color="#2e3336"
height="100vh"
expand-on-hover
v-if="!['Login'].include($route.name)">
Do I use the rigth method ?
Upvotes: 0
Views: 503
Reputation: 2412
You can use something like $route.name === 'Login'
, as $route.name is the current route name, so you can check directly like this.
Upvotes: 1