new AbstractPages()
Abstract base class for representing groups of pages
- Source:
Extends
- Backbone.View
Members
-
<abstract> router
-
Backbone.Router instance which is observed for navigation events
- Source:
-
<abstract> vent :module:js-whatever/js/vent-constructor.Vent
-
Instance of Vent used for navigation
Type:
- Source:
Methods
-
buildRoute(page) → {String}
-
Parameters:
Name Type Description pageString The page object
- Source:
Returns:
The current route for a given page
- Type
- String
-
changePage(pageName)
-
Change to the named page. This will call it's render method if this hasn't already been called,
and hide the current pageParameters:
Name Type Description pageNameString The name of the page
- Source:
-
findPage(pageName) → {Object}
-
Parameters:
Name Type Description pageNameString The name of the page
- Source:
Returns:
The page object with the given name
- Type
- Object
-
<abstract> initializePages()
-
Sets the value of this.pages to the list of page objects.
These must have a pageName and a constructor function.
The constructors should extend BasePage
A page marked with defaultPage will be used if the given page is not found.- Source:
Example
this.pages = [{ constructor: Foo, pageName: 'foo' }, { constructor: Bar, defaultPage: true, pageName: 'bar' }] -
navigateToPage(pageName)
-
Navigate to the named page, showing it and using the vent to propagate the navigation
Parameters:
Name Type Description pageNameString The name of the page
- Source: