NavigationCancel
An event triggered when a navigation is canceled, directly or indirectly.
class NavigationCancel extends RouterEvent {
constructor(id: number, url: string, reason: string)
reason: string
toString(): string
// 继承自 router/RouterEvent
constructor(id: number, url: string)
id: number
url: string
}
说明
表示当导航被取消时触发的事件。
This can happen when a route guard returns false
or initiates a redirect by returning a UrlTree
.
构造函数
属性
属性 | 说明 |
---|---|
reason: string | Declared in constructor. |
方法
参数没有参数。 返回值
|