NavigationBehaviorOptions
修改 Router
导航策略的选项。为 Router
导航功能提供包含任何这些属性的对象,以控制导航的处理方式。
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?: {...}
}
子接口
参见
属性
属性 | 说明 |
---|---|
skipLocationChange?: boolean | 导航时不要把新状态记入历史 When true, navigates without pushing a new state into history.
|
replaceUrl?: boolean | 导航时不要把当前状态记入历史 When true, navigates while replacing the current state in history.
|
state?: { [k: string]: any; } | 由开发人员定义的状态,可以传递给任何导航。当执行导航时会通过由 Router.getCurrentNavigation() 方法返回的 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 |