public getState(key?: string, coerce?: boolean): any
Retrieves the current 'state' from the browser history, parsing
location.hash for a specific key or returning an object containing the
entire state, optionally coercing numbers, booleans, null and undefined
values.
name
key An optional state key for which to return a value.
name
coerce If true, coerces any numbers or true, false, null, and undefined to their actual value. Defaults to false
Parameters
key?: stringoptional
coerce?: booleanoptional
Returns
any
public getState(coerce?: boolean): any
Parameters
coerce?: booleanoptional
Returns
any
public pushState(params?: string, merge_mode?: number)
Adds a 'state' into the browser history at the current position, setting
location.hash and triggering any bound callbacks
(provided the new state is different than the previous state).
name
params A serialized params string or a hash string beginning with # to merge into location.hash.
name
merge_mode Merge behavior defaults to 0 if merge_mode is not specified (unless a hash string beginning with # is specified, in which case merge behavior defaults to 2)
Parameters
params?: stringoptional
merge_mode?: numberoptional
public pushState(params?: any, merge_mode?: number)
Parameters
params?: anyoptional
merge_mode?: numberoptional
public removeState(key?: Array<any>)
Remove one or more keys from the current browser history 'state', creating
a new state, setting location.hash and triggering any bound
callbacks (provided the new state is different than
the previous state).
name
key One or more key values to remove from the current state.