Class: BaseRouter
Hierarchy
BaseRouter
Implements
Constructors
constructor
• new BaseRouter()
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:26
Properties
history
• history: Location
[]
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:22
i18n
• i18n: I18n
= {}
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:21
params
• params: AnonymousObject
<any
> = {}
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:23
route
• Optional
route: string
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:24
settings
• settings: AppSettings
= {}
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:20
Accessors
hash
• get
hash(): undefined
| null
| ParsedQuery
<string
>
Returns
undefined
| null
| ParsedQuery
<string
>
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:38
href
• get
href(): undefined
| null
| string
Returns
undefined
| null
| string
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:46
location
• get
location(): Location
Returns
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:30
pathname
• get
pathname(): null
| string
Returns
null
| string
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:50
previousLocation
• get
previousLocation(): Location
Returns
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:34
query
• get
query(): undefined
| null
| ParsedQuery
<string
>
Returns
undefined
| null
| ParsedQuery
<string
>
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:42
state
• get
state(): undefined
| null
| AnonymousObject
<any
>
Returns
undefined
| null
| AnonymousObject
<any
>
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:54
Methods
_pushLocation
▸ _pushLocation(location
, replace?
): void
Parameters
Name | Type | Default value |
---|---|---|
location | Location | undefined |
replace | boolean | false |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:130
back
▸ Abstract
back(delta?
): void
Parameters
Name | Type |
---|---|
delta? | number |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:58
deleteOrigin
▸ deleteOrigin(): void
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:60
forward
▸ Abstract
forward(delta?
): void
Parameters
Name | Type |
---|---|
delta? | number |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:64
getLinkComponent
▸ Abstract
getLinkComponent(props
, ref
): Element
Parameters
Name | Type |
---|---|
props | LinkProps |
ref | null | MutableRefObject <null | HTMLAnchorElement > | (instance : null | HTMLAnchorElement ) => void |
Returns
Element
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:66
getOrigin
▸ getOrigin(): Object
Returns
Object
Name | Type |
---|---|
from | string |
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:75
getReactContext
▸ getReactContext(): Context
<any
>
Returns
Context
<any
>
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:71
init
▸ init(settings
): void
Parameters
Name | Type |
---|---|
settings | AppSettings |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:80
listen
▸ Abstract
listen(callback
): 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'} }
Parameters
Name | Type |
---|---|
callback | LocationChangeCallback |
Returns
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:95
push
▸ Abstract
push(urlOrLocation
, options?
): 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'} }
Parameters
Name | Type |
---|---|
urlOrLocation | string | Location |
options? | RouterPushOptions |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:109
replace
▸ Abstract
replace(urlOrLocation
, options?
): void
Parameters
Name | Type |
---|---|
urlOrLocation | string | Location |
options? | RouterPushOptions |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:111
saveOrigin
▸ saveOrigin(force?
): void
Parameters
Name | Type | Default value |
---|---|---|
force | boolean | true |
Returns
void
Implementation of
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:113