BrowserNavigation

App.BrowserNavigation. BrowserNavigation

Wrapper over pushState() API. Handles navigation between different pages

Constructor

new BrowserNavigation()

See:

Methods

off(event, handler)

Unsubscribe

Parameters:
Name Type Description
event
handler

on(event, handler)

Subscribe event. The callback will be triggered when this event occurs. See App.BrowserNavigation.Events for supported events.

Parameters:
Name Type Description
event
handler function

callback to be invoked once the event occurs

pushState(state, title, url)

Uses HTML5 browser history API to push state onto browser stack and triggers event, 'page-change'

Parameters:
Name Type Description
state

current state. This state will be available to the listeners

title

title (not implemented by browsers)

url

url to show in browser's navigation bar