Properties
(Mandatory properties are in bold)Properties | Type | Description |
---|
back | back(): void | |
constructor | new LocalRouter() | |
deleteOrigin | deleteOrigin(): void | |
forward | forward(): void | |
getLinkComponent | getLinkComponent(): 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'}
} |
| listeners | | |
| location | | |
| params | AnonymousObject<any> | |
| pathname | | |
| previousLocation | | |
| push | push(urlOrLocation: string | Location): 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): void | |
| saveOrigin | saveOrigin(force: boolean): void | |
| settings | AppSettings | |
| state | | |
Additional properties for advanced use cases
Properties | Type | Description |
---|
route | string | |