0👍
If you want to route to /admin
page a user after login, you can try this:
@click="navigateToAdmin()"
navigateToAdmin() {
// if login success
this.$router.push('/admin'); // automatically routes to admin page
}
If you going to /admin
page manually;
<router-link to="/admin">Admin</router-link>
- [Vuejs]-Why does my Nuxt.js app display a blank page after deploying with Netlify?
- [Vuejs]-Making a grid of <video> elements in vue.js, with drag & drop ordering and resizing
0👍
You can’t use an unknown route with <router-link>
or router.push
because the router will fail to resolve it (since that route is not configured in the router).
You should use a regular link
- [Vuejs]-Issue data-binding in conditional rendering (Vue.js)
- [Vuejs]-Laravel7 CORS : blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin'
Source:stackexchange.com