Share via


NavigationManager.RegisterLocationChangingHandler Method

Definition

Registers a handler to process incoming navigation events.

public IDisposable RegisterLocationChangingHandler (Func<Microsoft.AspNetCore.Components.Routing.LocationChangingContext,System.Threading.Tasks.ValueTask> locationChangingHandler);
member this.RegisterLocationChangingHandler : Func<Microsoft.AspNetCore.Components.Routing.LocationChangingContext, System.Threading.Tasks.ValueTask> -> IDisposable
Public Function RegisterLocationChangingHandler (locationChangingHandler As Func(Of LocationChangingContext, ValueTask)) As IDisposable

Parameters

locationChangingHandler
Func<LocationChangingContext,ValueTask>

The handler to process incoming navigation events.

Returns

An IDisposable that can be disposed to unregister the location changing handler.

Applies to