Table of Contents

Method UseHref

Namespace
Velvet
Assembly
Velvet.Docs.dll

UseHref(string, RelativeRoutingType)

Returns the string an anchor would link to with, its resolved pathname, search and hash joined: React Router's useHref.

public static string UseHref(string to, RelativeRoutingType relative = RelativeRoutingType.Route)

Parameters

to string

Absolute or relative target; the empty string is the calling route itself.

relative RelativeRoutingType

Whether a .. drops a route or a URL segment.

Returns

string

Exceptions

InvalidOperationException

No V.RouterProvider is mounted above the caller.