Skip to main content

BaseRouter

Properties

(Mandatory properties are in bold)
PropertiesTypeDescription
backback(delta: number): void
constructornew BaseRouter()
deleteOrigindeleteOrigin(): void
forwardforward(delta: number): void
getLinkComponentgetLinkComponent(props: LinkProps,ref: null | MutableRefObject<null | HTMLAnchorElement> | ): Element
getOrigingetOrigin():
hash
historyLocation[]
href
i18nI18n
initinit(settings: AppSettings): void
listenlisten(callback: LocationChangeCallback): UnregisterCallbackcallback(url) where url is:

{
url: string, // example: /users/1?test=1&test2#h=3&h2
route: string, // example: /users/[id]
pathname: string, // example: /users/1
query: obj, // example: {test:1,test2:null}
hash: obj // example: {h:3, h2:null}
state: obj // example: {key1: 'value1'}
} | | location | | | | params | AnonymousObject<any> | | | pathname | | | | previousLocation | | | | push | push(urlOrLocation: string | Location,options: RouterPushOptions): void | url can be a string or a location.
If location, the format is the following
{
url: string, // example: /users/1?test=1&test2#h=3&h2
route: string, // example: /users/[id]
pathname: string, // example: /users/1
query: obj, // example: {test:1,test2:null}
hash: obj // example: {h:3, h2:null}
state: obj // example: {key1: 'value1'}
} | | query | | | | replace | replace(urlOrLocation: string | Location,options: RouterPushOptions): void | | | saveOrigin | saveOrigin(force: boolean): void | | | settings | AppSettings | | | state | | |

Additional properties for advanced use cases
PropertiesTypeDescription
routestring