VueJs vue-router linking an external website VueJs vue-router linking an external website vue.js vue.js

VueJs vue-router linking an external website


I read Daniel's Link and found a workaround:

{     path: '/github',     beforeEnter() {location.href = 'http://github.com'}}


<a :href="'//' + websiteUrl" target="_blank">  {{ url }}</a>


If you use vuetify, you can use v-list-item, v-card or v-btn.

They all have a property target which you can set to _blank e.g.:

<v-list-item href="https://google.com" target="_blank">Google</v-list-item>