interface
Options that modify the Router
navigation strategy. Supply an object containing any of these properties to a Router
navigation function to control how the navigation should be handled.
interface NavigationBehaviorOptions { skipLocationChange?: boolean replaceUrl?: boolean state?: {...} }
Property | Description |
---|---|
skipLocationChange?: boolean | When true, navigates without pushing a new state into history. // Navigate silently to /view this.router.navigate(['/view'], { skipLocationChange: true }); |
replaceUrl?: boolean | When true, navigates while replacing the current state in history. // Navigate to /view this.router.navigate(['/view'], { replaceUrl: true }); |
state?: {
[k: string]: any;
} | Developer-defined state that can be passed to any navigation. Access this value through the After a navigation completes, the router writes an object containing this value together with a Note that |
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/router/NavigationBehaviorOptions