NuxtLink
You can use it like you used it before.
<template>
<NuxtLink :to="`/parent/child/two/profile/${id}`">Go to profile</NuxtLink>
<NuxtLink :to="{
name: 'parent-child-two-profile-id',
params: { id: 1 }
}">
Go to profile
</NuxtLink>
</template>
Your IDE will throw an error if the route name
does not exists or if the params
are invalid.
You can do CLI type checking for
<NuxtLink/>
with the vue-tsc
package.
external
prop is supported since v3.1.0
<template>
<!-- Valid -->
<NuxtLink to="http://google.com" external>Go to profile</NuxtLink>
</template>
<NuxtLink/>
typings can only be provided if you use the Volar extension