I'm trying to get a link from one website, to a specific component in another external website. The external website is utilizing vue and vue-router.
Assume that the first site is running on localhost:3000, I want to redirect to localhost/#/payments.
When I try direct redirect using this snippet(in localhost:3000):
<script>
window.location.href = "http://localhost/#/payments";
</script>
Vue is opening the default component, which is not desired.
EDIT: This is the router of localhost:
export default function paymentRoutes() {
return [
{
path: "/payment/",
name: "PaymentSuccess",
component: PaymentSuccess
}
]
}
then in separated file:
Vue.use(VueRouter)
const routes = [ ...paymentRoutes()]
const router = new VueRouter({
routes
})
export default router