How to open a link in a new tab in a application when using ?

1 answer 1

In vue-route starting from version 3.0.1 for route-link you need to use the target parameter with the value _blank , example:

 <router-link :to="{ name: 'routeName'}" target="_blank">Link Text</router-link> 

if this method is not suitable, then it can be done in the event handler we need:

 let route = this.$router.resolve({name: 'routeName', params: {}}}); window.open(route.href, '_blank');