I have a Vue.js app where a have a link tag that is not rendered by Vue, and I cannot add the runtime compiler to my bundle.
The link tag will point to a valid route that has been registered with Vue Router. I'd like to be able to soft navigate to the route (basically the same behaviour as <router-link />
) when the link is clicked.
Currently clicking the link causes a hard page refresh. Is there a way of accessing the router globally? My app is compiled using webpack. The Vue
instance is not currently available on the window
, and I'd prefer not to expose it if possible.
Any suggestions? Thanks.