Share via


Router 類別

定義

元件,提供對應至目前導覽狀態的路由資料。

public ref class Router : IDisposable, Microsoft::AspNetCore::Components::IComponent, Microsoft::AspNetCore::Components::IHandleAfterRender
public class Router : IDisposable, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender
type Router = class
    interface IComponent
    interface IHandleAfterRender
    interface IDisposable
Public Class Router
Implements IComponent, IDisposable, IHandleAfterRender
繼承
Router
實作

建構函式

Router()

元件,提供對應至目前導覽狀態的路由資料。

屬性

AdditionalAssemblies

取得或設定其他元件集合,這些元件應搜尋可符合 URI 的元件。

AppAssembly

取得或設定應該搜尋符合 URI 之元件的元件。

Found

取得或設定在找到所要求路由的相符專案時要顯示的內容。

Navigating

取得或設定非同步導覽進行時要顯示的內容。

NotFound

取得或設定找不到所要求路由相符專案時要顯示的內容。

OnNavigateAsync

取得或設定應該在流覽至新頁面之前呼叫的處理常式。

PreferExactMatches
已淘汰.

取得或設定旗標,指出路由比對是否應該優先比對萬用字元。

這個屬性已經過時,而且設定它不會執行任何動作。

方法

Attach(RenderHandle)

將元件附加至 RenderHandle

Dispose()

元件,提供對應至目前導覽狀態的路由資料。

SetParametersAsync(ParameterView)

設定由元件父系在轉譯樹狀結構中提供的參數。

明確介面實作

IHandleAfterRender.OnAfterRenderAsync()

元件,提供對應至目前導覽狀態的路由資料。

適用於