NavigationCancel
An event triggered when a navigation is canceled, directly or indirectly. This can happen for several reasons including when a route guard returns false or initiates a redirect by returning a UrlTree.
API
class NavigationCancel extends RouterEvent { constructor(id: number, url: string, reason: string, code?: NavigationCancellationCode | undefined): NavigationCancel; readonly type: EventType.NavigationCancel; override reason: string; toString(): string; override id: number; override url: string;} constructor
NavigationCancelnumberstringstringA description of why the navigation was cancelled. For debug purposes only. Use code instead for a stable cancellation reason that can be used in production.
NavigationCancellationCode | undefinedA code to indicate why the navigation was canceled. This cancellation code is stable for the reason and can be relied on whereas the reason string could change and should not be used in production.
NavigationCancelreason
stringA description of why the navigation was cancelled. For debug purposes only. Use code instead for a stable cancellation reason that can be used in production.
toString
stringstringid
numberA unique ID that the router assigns to every router navigation.
url
stringThe URL that is the destination for this navigation.