Class: LocalRouter
Hierarchy
↳
LocalRouter
Constructors
constructor
• new LocalRouter()
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:10
Properties
history
• history: Location
[]
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:22
i18n
• i18n: I18n
= {}
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:21
listeners
• listeners: Object
Index signature
▪ [x: string
]: LocationChangeCallback
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:7
params
• params: AnonymousObject
<any
> = {}
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:23
route
• Optional
route: string
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:24
settings
• settings: AppSettings
= {}
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:20
Accessors
hash
• get
hash(): undefined
| null
| ParsedQuery
<string
>
Returns
undefined
| null
| ParsedQuery
<string
>
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:38
href
• get
href(): undefined
| null
| string
Returns
undefined
| null
| string
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:46
location
• get
location(): Location
Returns
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:30
pathname
• get
pathname(): null
| string
Returns
null
| string
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:50
previousLocation
• get
previousLocation(): Location
Returns
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:34
query
• get
query(): undefined
| null
| ParsedQuery
<string
>
Returns
undefined
| null
| ParsedQuery
<string
>
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:42
state
• get
state(): undefined
| null
| AnonymousObject
<any
>
Returns
undefined
| null
| AnonymousObject
<any
>
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
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:130
_pushOrReplace
▸ _pushOrReplace(urlOrLocation
, replace
): void
Parameters
Name | Type |
---|---|
urlOrLocation | string | Location |
replace | boolean |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:41
back
▸ back(): void
Returns
void
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:16
deleteOrigin
▸ deleteOrigin(): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:60
forward
▸ forward(): void
Returns
void
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:19
getLinkComponent
▸ getLinkComponent(): Element
Returns
Element
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:23
getOrigin
▸ getOrigin(): Object
Returns
Object
Name | Type |
---|---|
from | string |
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:75
getReactContext
▸ getReactContext(): Context
<any
>
Returns
Context
<any
>
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:71
init
▸ init(settings
): void
Parameters
Name | Type |
---|---|
settings | AppSettings |
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:80
listen
▸ 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
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:35
push
▸ push(urlOrLocation
): 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 |
Returns
void
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:27
replace
▸ replace(urlOrLocation
): void
Parameters
Name | Type |
---|---|
urlOrLocation | string | Location |
Returns
void
Overrides
Defined in
onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:31
saveOrigin
▸ saveOrigin(force?
): void
Parameters
Name | Type | Default value |
---|---|---|
force | boolean | true |
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/router/Router.ts:113