I have a summary page and a detail subpage. All of the routes are implemented with vue-router
(v 0.7.x) using programmatic navigation like this:
this.$router.go({ path: "/link/to/page" })
However, when I route from the summary page to the subpage, I need to open the subpage in a new tab just as one would by adding _target="blank"
to an <a>
tag.
Is there a way to do this?
Just write this code in your routing file :
I think that you can do something like this:
it worked for me. thanks.
I think the best way is to simply use:
Somewhere in your project, typically main.js or router.js
In your component:
For those who are wondering the answer is no. See related issue on github.
It seems like this is now possible in newer versions (Vue Router 3.0.1):