Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuxt: How to open page in a new tab

I go through the documentation of Nuxt, but couldn't find information about how to open a page in a new tab. Is there a way to open a link in a new tab instead of opening it in the current tab? I tried the following code:

<nuxt-link to="/user" target="_blank">User</nuxt-link>

But it doesn't work.

like image 283
JackJack Avatar asked Apr 18 '19 19:04

JackJack


1 Answers

As @anthonygore pointed out in a comment to first post. It's now working to open link in a new tab by NuxtLink, having all the features of router name/path link

do it with by adding target="_blank" to/inside NuxtLink to have

<NuxtLink :to="..." target="_blank">Link</a>

or just use default

<a href="..." target="_blank">Link</a>
like image 199
devzom Avatar answered Sep 17 '22 12:09

devzom