Home Reference Source
import HashManager from '~/models/HashManager.js'
public class | source

HashManager

Manages location hashes.

Constructor Summary

Public Constructor
public

Takes no args

Member Summary

Public Members
public get

Returns string representing

public get

Returns string representing navigation hash

public
public
public get

Gets hash repesenting value

Method Summary

Public Methods
public

Obtains the value of a key

public

Gets navigation value for depth

public

You shouldn't need to call this but it updates the hash in the URL

public

setContextValue(key: string, value: string)

Updates the state to store a new key

public

setNavigationValue(depth: number, position: string)

Sets the navigation key.

Public Constructors

public constructor() source

Takes no args

Public Members

public get hash: string source

Returns string representing

Return:

string

public get locationHash: string source

Returns string representing navigation hash

public navigation source

public state source

public get valueHash source

Gets hash repesenting value

Public Methods

public getContextValue(key: string): string source

Obtains the value of a key

Params:

NameTypeAttributeDescription
key string

Return:

string (nullable: true)

public getNavigationValue(depth: number): string source

Gets navigation value for depth

Params:

NameTypeAttributeDescription
depth number

navigation item depth

Return:

string

position string

public resyncHash() source

You shouldn't need to call this but it updates the hash in the URL

public setContextValue(key: string, value: string) source

Updates the state to store a new key

Params:

NameTypeAttributeDescription
key string
value string

public setNavigationValue(depth: number, position: string) source

Sets the navigation key. If depth is greater than supported than empty.

Params:

NameTypeAttributeDescription
depth number

navigation item depth.

position string

navigation string value