I have a sample Vue router here which handles going to the login first before accessing the form with a specific id:
router = new VueRouter({
routes: [
{path: '/form/:id', redirect: '/login'},
{path: '/login', name: 'Login', component: Login}
]
});
Is there a way that the login can still access the :id parameter passed since when I run http://localhost:8080/form/c101-101 it directly redirects to the Login component and when I try to log this.$route.params.id inside the login component it's undefined. Is there a way I can pass the :id on redirect?