Is there a way to open a new tab and pass it params as you would using $router.push? #14272
Replies: 2 comments 2 replies
-
|
This question is directly and only related to https://github.com/vuejs/router. Please use their issue tracker or Vue's community channels. But, after a simple Google search, I found this, it was the same possible solution that came to my mind: https://stackoverflow.com/a/47874850 const { href } = this.$router.resolve({ name: 'routeName', params: { data: "someData" } });
window.open(href, '_blank');However, I am not 100% sure how an array of objects is handled. Normally, params can be a string, a number, or an array of these. If the solution doesn't work for you, then it would be because it's not properly serializable. You might want to serialize and deserialize objects yourself if that turns out to be the case. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, I built this library to make this easier & auto-detect ctrl/cmd while performing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I'm using a $router.push to open a page. It would be really useful for us to be able to open the page in a new tab, but I can't find a way to do it and still pass in properties as parameters like we're doing below. Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions