Dela via


Microsoft.AspNetCore.Components.Routing Namespace

Provides components that support rendering and mapping routes to components. Not intended for use outside the Blazor framework.

Classes

FocusOnNavigate

After navigating from one page to another, sets focus to an element matching a CSS selector. This can be used to build an accessible navigation system compatible with screen readers.

LocationChangedEventArgs

EventArgs for LocationChanged.

LocationChangingContext

Contains context for a change to the browser's current location.

NavigationContext

Provides information about the current asynchronous navigation event including the target path and the cancellation token.

NavigationLock

A component that can be used to intercept navigation events.

NavLink

A component that renders an anchor tag, automatically toggling its 'active' class based on whether its 'href' matches the current URI.

RazorComponentsEndpointHttpContextExtensions

Extensions to HttpContext for Razor component applications.

Router

A component that supplies route data corresponding to the current navigation state.

Interfaces

IHostEnvironmentNavigationManager

An optional interface for NavigationManager implementations that must be initialized by the host.

INavigationInterception

Contract to setup navigation interception on the client.

IRoutingStateProvider

Provides RouteData

IScrollToLocationHash

Contract to setup scroll to location hash.

Enums

NavLinkMatch

Modifies the URL matching behavior for a NavLink.

Remarks

For more information about routing, see ASP.NET Core Blazor routing.