NavigationStart
代表导航开始时触发的事件。
An event triggered when a navigation starts.
class NavigationStart extends RouterEvent {
constructor(id: number, url: string, navigationTrigger: "imperative" | "popstate" | "hashchange" = 'imperative', restoredState: { [k: string]: any; navigationId: number; } = null)
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange'
restoredState?: {...}
toString(): string
// 继承自 router/RouterEvent
constructor(id: number, url: string)
id: number
url: string
}
构造函数
参数
|
属性
属性 | 说明 |
---|---|
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange' | Identifies the call or event that triggered the navigation. An |
restoredState?: { [k: string]: any; navigationId: number; } | null | The navigation state that was previously supplied to the The state object is defined by From the perspective of the router, the router never "goes back". When the user clicks on the back button in the browser, a new navigation ID is created. Use the ID in this previous-state object to differentiate between a newly created state and one returned to by a |
方法
参数没有参数。 返回值
|