跳至主要內容
版本:v8

ion-nav-link

導覽連結用於導覽至指定的元件。可以透過 `forward`、`back` 或作為 `root` 元件進行導覽。

它是呼叫導覽控制器上的 `push()`、`pop()` 和 `setRoot()` 方法的元素形式。

請參閱導覽文件以取得更多資訊。

屬性

component

描述要導覽至的元件。僅在 `routerDirection` 為 `forward` 或 `root` 時使用。
屬性component
類型Function | HTMLElement | ViewController | null | string | undefined
預設值undefined

componentProps

描述您要作為 props 傳遞給元件的資料。僅在 `routerDirection` 為 `forward` 或 `root` 時使用。
屬性undefined
類型undefined | { [key: string]: any; }
預設值undefined

routerAnimation

描述導覽至另一個頁面時的轉換動畫。
屬性undefined
類型((baseEl: any, opts?: any) => Animation) | undefined
預設值undefined

routerDirection

描述導覽至另一個頁面時的轉換方向。
屬性router-direction
類型"back" | "forward" | "root"
預設值'forward'

事件

此元件沒有可用的事件。

方法

此元件沒有可用的公開方法。

CSS 陰影部分

此元件沒有可用的 CSS 陰影部分。

CSS 自訂屬性

此元件沒有可用的 CSS 自訂屬性。

插槽

此元件沒有可用的插槽。