mediator

App. mediator

Source:

Methods

(static) getCurrentPage() → {Object}

Get the currentPage object
Source:
Returns:
Type:
Object
PageObject

(static) goto(obj, previousPoppedUrl)

Change the current page to the requested route Do nothing if the current page is already the requested route
Source:
This:
Parameters:
Name Type Description
obj String Page requested
previousPoppedUrl String Url
Fires:

(static) notify(key, data, cb)

Notify all registered component and page
Source:
See:
  • AER in http://addyosmani.com/largescalejavascript/
This:
  • Mediator
Parameters:
Name Type Description
key String Notify key
data Object Object passed to notified methods
cb function Callback executed when the notify is done
Returns:
this

(static) notifyCurrentPage(key, data, cb)

Scope the _callAction actions only for the current page
Source:
This:
  • {Object}
Parameters:
Name Type Description
key String Notify key
data Object Bag of data
cb function Callback executed after all the _callAction are executed
Returns:
this

(static) toggle(route, fallback)

Open the wanted page, return to the precedent page if the requested on is already open or fallback to a default one
Source:
Parameters:
Name Type Description
route String Url
fallback String Url used for as a fallback
Fires: