-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Hello,
I'm not sure if this the correct way of thinking - but I want one of my components to be disabled or deactivated on some routes.
So here's my routes.
router.map({
'/': { component: ProductsView },
'/auth/login': { component: LoginView },
'/auth/register': { component: RegisterView },
'/products': { component: ProductsView },
'/products/:product': { component: ProductView },
'/categories': { component: CategoriesView },
'/categories/:category': { component: CategoryView },
'*': { component: NotFoundView }
});
My main template file looks like so:
<!DOCTYPE html>
<html lang="en" id="app">
<head>
<!-- Head Contents -->
</head>
<body>
<header>
<!-- Header Contents -->
<navigation></navigation>
</header>
<div class="container">
<router-view></router-view>
</div>
</body>
</html>
When I'm on either the /auth/login
or /auth/register
routes - I do not want my navigation component to appear.
How can I achieve this?
antur123, alexander-sharecreators, silica67sdm, adarshsrivastava11, titusdecali and 11 more
Metadata
Metadata
Assignees
Labels
No labels