linkExtraOptions
npm Package | @angular/router |
---|---|
Module | import { ExtraOptions } from '@angular/router'; |
Source | router/src/router_module.ts |
Represents options to configure the router.
linkInterface Overview
interface ExtraOptions {
enableTracing?: boolean
useHash?: boolean
initialNavigation?: InitialNavigation
errorHandler?: ErrorHandler
preloadingStrategy?: any
onSameUrlNavigation?: 'reload' | 'ignore'
paramsInheritanceStrategy?: 'emptyOnly' | 'always'
}
linkMembers
useHash?: boolean
Enables the location strategy that uses the URL fragment instead of the history API.
onSameUrlNavigation?: 'reload' | 'ignore'
Define what the router should do if it receives a navigation request to the current URL. By default, the router will ignore this navigation. However, this prevents features such as a "refresh" button. Use this option to configure the behavior when navigating to the current URL. Default is 'ignore'.
paramsInheritanceStrategy?: 'emptyOnly' | 'always'
Defines how the router merges params, data and resolved data from parent to child routes. Available options are:
'emptyOnly'
, the default, only inherits parent params for path-less or component-less routes.'always'
, enables unconditional inheritance of parent params.