.navigate()

Parameters

HTMLElement | String | null

target

An element passed either by reference or a CSS selector passed as a string (if multiple elements match the selector; the first match will be navigated).

If null or no value is passed to this argument, the vv-shell element will be navigated (top navigation).

String

position

A Navigation.POSITION string which will determine where content from the navigated page should be injected relative to target.

String

mode

A Navigation.MODE string which will determine how content from the navigated page should be injected relative to target.

Return value

Promise

Returns a Promise that will resolve when the navigated page has been injected sucessfully, or rejects if the navigation failed or if the navigation was aborted with Navigation.abort


Examples

Top navigation

Navigate the vv-shell element to another page (top navigation).

Remember that anchor tags with href's on the same origin are automatically navigated this way.

Navigating an element

Simple programmatic navigation of an element.