Routing

App.Routing. Routing

new Routing(hash, query)

See:
Parameters:
Name Type Description
hash
query

Members

isEmbedded

Methods

(static) query()

parses query string to object with values

Example
ex: url
"goto/p/helium/PartPage?embed=true&panel=tvc%3Atoppanel%3Atvx%3Aenc%2FPartPanel.xml&objectId=14668.27509.6640.55228"

returns
{
    "embed": ["true"],
    "panel": ["tvc:toppanel:tvx:enc/PartPanel.xml"],
    "objectId": ["14668.27509.6640.55228"]
}

(static) search(url) → {*}

Parameters:
Name Type Description
url
Returns:
Type
*

(static) split()

split with separator ex: 'key=value' returns { left : 'key', right: 'value' }

entry(pageRef) → {Promise}

Goto an entry page. THis is a page without any context object.

Parameters:
Name Type Description
pageRef String

The page to open, e.g. tvc:page/MyStartPage.xml

Returns:
Type
Promise

entryPagesInBackground(pageRefs) → {promise}

Loads non-object pages in background, i.e. not visible on screen. Use this API if you want to cache non-object pages in background to make them available when offline.

Parameters:
Name Type Description
pageRefs array

list of page refs whose Helium pages need to be cached

Returns:
Type
promise

initialize()

launchSearch(search) → {Promise}

Converts the query string into search criteria and launches search with homepage as configured in the search config in background.

Example
ex: url
"internal/goto/s/hex/common/TopBarSearchV2?enovia_type=Part&enovia_state=Development Part:Create"
Parameters:
Name Type Description
search string

reference

Returns:

Promise object which will resolve to launch search.

Type
Promise

Navigates the page for an object. The kind page usually differs between different type of objects.

Parameters:
Name Type Description
objectId String

Object id to display

hash String

about the page

query Object

values about the page

Returns:
Type
Promise

open(objectId, hash, query)

Opens the page for an object. The kind page usually differs between different type of objects.

Parameters:
Name Type Description
objectId String

Object id to display

hash String

about the page

query Object

values about the page

openClick(objectId, Click)

Internally calls App.routing.open, but also prevents the click event propagating further. Can be used in Handlebars templates to avoid other bound events from triggering.

Parameters:
Name Type Description
objectId String

Object id to display

Click event

event originating from the link DOM element

openObjectsInBackground(objectIds) → {promise}

Loads objects in background, i.e. not visible on screen. Use this API if you want to cache objects in background to make them available when offline.

Parameters:
Name Type Description
objectIds array

list of object ids whose Helium pages need to be cached

Returns:
Type
promise

start() → {Promise}

Goto the start page, i.e the page and/or object that is found in the _deeplink object.

Returns:
Type
Promise