Properties
(Mandatory properties are in bold)Properties | Type | Description |
---|
back | back(delta: number): void | |
constructor | new BaseRouter() | |
deleteOrigin | deleteOrigin(): void | |
forward | forward(delta: number): void | |
getLinkComponent | getLinkComponent(props: LinkProps,ref: null | MutableRefObject<null | HTMLAnchorElement> | ): Element | |
getOrigin | getOrigin(): | |
hash | | |
history | Location[] | |
href | | |
i18n | I18n | |
init | init(settings: AppSettings): void | |
listen | listen(callback: LocationChangeCallback): UnregisterCallback | callback(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
Properties | Type | Description |
---|
route | string | |