I have a side menu which i don't want to show in login/register page and I need to show it in almost all other pages. How do i go about it?
<div id="app ui container">
<Menu/>
<router-view/>
</div>
There are far better ways to handle this, but since you are not sharing your code you can use something like this:
computed: {
hide () {
return this.$route.path === '/login' || this.$route.path === '/register';
}
}
Alternatively you can still use hide/show on the element itself as:
<Menu v-if='this.$route.path !== "login" || this.$route.path !== "/register"'/>
but that is even far less recommended
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With