MCPcopy
hub / github.com/nuxt/nuxt / navigate

Function navigate

packages/nuxt/src/app/components/nuxt-link.ts:270–278  ·  view source on GitHub ↗
(_e?: MouseEvent)

Source from the content-addressed store, hash-verified

268 isExactActive: link?.isExactActive ?? computed(() => to.value === router.currentRoute.value.path),
269 route: link?.route ?? computed(() => router.resolve(to.value)),
270 async navigate (_e?: MouseEvent) {
271 if (href.value === null) {
272 if (import.meta.dev) {
273 console.warn(`[${componentName}] refused to navigate to a URL with a script-capable protocol.`)
274 }
275 return
276 }
277 await navigateTo(href.value, { replace: unref(props.replace), external: isExternal.value || hasTarget.value })
278 },
279 } satisfies Omit<ReturnType<typeof useLink>, 'href'> & {
280 to: ComputedRef<RouteLocationRaw>
281 href: ComputedRef<string | null>

Callers

nothing calls this directly

Calls 1

navigateToFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…