NavigationExtras
修改 Router
导航策略的选项。为 Router
导航功能提供包含任何这些属性的对象,以控制应如何构造或解释目标 URL。
Options that modify the Router
navigation strategy. Supply an object containing any of these properties to a Router
navigation function to control how the target URL should be constructed or interpreted.
interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {
// 继承自 router/UrlCreationOptions
relativeTo?: ActivatedRoute | null
queryParams?: Params | null
fragment?: string
queryParamsHandling?: QueryParamsHandling | null
preserveFragment?: boolean
// 继承自 router/NavigationBehaviorOptions
skipLocationChange?: boolean
replaceUrl?: boolean
state?: {...}
}