Skip to main content

Class: LocalRouter

Hierarchy

Constructors

constructor

new LocalRouter()

Overrides

BaseRouter.constructor

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:10

Properties

history

history: Location[]

Inherited from

BaseRouter.history

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:22


i18n

i18n: I18n = {}

Inherited from

BaseRouter.i18n

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

BaseRouter.params

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:23


route

Optional route: string

Inherited from

BaseRouter.route

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:24


settings

settings: AppSettings = {}

Inherited from

BaseRouter.settings

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

Location

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

Location

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

NameTypeDefault value
locationLocationundefined
replacebooleanfalse

Returns

void

Inherited from

BaseRouter._pushLocation

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:130


_pushOrReplace

_pushOrReplace(urlOrLocation, replace): void

Parameters

NameType
urlOrLocationstring | Location
replaceboolean

Returns

void

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:41


back

back(): void

Returns

void

Overrides

BaseRouter.back

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:16


deleteOrigin

deleteOrigin(): void

Returns

void

Inherited from

BaseRouter.deleteOrigin

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:60


forward

forward(): void

Returns

void

Overrides

BaseRouter.forward

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:19


getLinkComponent

getLinkComponent(): Element

Returns

Element

Overrides

BaseRouter.getLinkComponent

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:23


getOrigin

getOrigin(): Object

Returns

Object

NameType
fromstring

Inherited from

BaseRouter.getOrigin

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:75


getReactContext

getReactContext(): Context<any>

Returns

Context<any>

Inherited from

BaseRouter.getReactContext

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:71


init

init(settings): void

Parameters

NameType
settingsAppSettings

Returns

void

Inherited from

BaseRouter.init

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

NameType
callbackLocationChangeCallback

Returns

UnregisterCallback

Overrides

BaseRouter.listen

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

NameType
urlOrLocationstring | Location

Returns

void

Overrides

BaseRouter.push

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:27


replace

replace(urlOrLocation): void

Parameters

NameType
urlOrLocationstring | Location

Returns

void

Overrides

BaseRouter.replace

Defined in

onekijs/packages/onekijs-framework/src/router/LocalRouter.ts:31


saveOrigin

saveOrigin(force?): void

Parameters

NameTypeDefault value
forcebooleantrue

Returns

void

Inherited from

BaseRouter.saveOrigin

Defined in

onekijs/packages/onekijs-framework/src/router/Router.ts:113