NavigationManager.RegisterLocationChangingHandler 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
註冊處理常式來處理傳入導覽事件。
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
參數
- locationChangingHandler
- Func<LocationChangingContext,ValueTask>
處理傳入導覽事件的處理常式。
傳回
IDisposable,可處置以取消註冊位置變更處理常式。