Hi everyone,
The screenshot shows a menu from a website built with vue js. What I want to do is to redirect to external resources such as google.com outside the site when this menu is clicked. Is it possible to do this in router/index.js?
let router = new Router({
base: process.env.BASE_URL,
mode: "history",
routes: [
{
path: "/xxx",
name: "dashboard",
meta: {},
url: "www.xxxxafafa.org" // as this
},
With the path field, it is understood which menu is the clicked menu. Since the code will enter here when this menu is clicked on the page, what I want to do is to redirect to any external source from within the block.
I will be waiting for your help. Thanks.
There is Per-Route Guard
beforeEnter: (to, from, next) => {
window.location.href = 'http://www.xxxxafafa.org'
}