import AppRouter from 'typhonjs-backbone-localstorage-todos/site/js/router/AppRouter.js'
AppRouter
Provides a basic Backbone.Router
to route between app states: all
, active
& completed
. When a user
navigates between these different filter type states Backbone.history.navigate
is invoked in App->selectFilter
to update the navigation history allowing the user to use the back and forward browser controls to navigate the app.
When a filter type is selected it is referenced in the current URL for the web app.
Please note that in App.js->s_INITIALIZE_ROUTES
a default catch all no route callback is specified which handles
unmatched routes.
Constructor Summary
Public Constructor | ||
public |
Creates the routes delegated to the given methods specified. |
Inherited Summary
From class Events | ||
public |
bind(): * Delegates to |
|
public |
Tell an object to listen to a particular event on an other object. |
|
public |
listenToOnce(obj: object, name: string, callback: function): Events Just like |
|
public |
Remove a previously-bound callback function from an object. |
|
public |
Bind a callback function to an object. |
|
public |
Just like |
|
public |
stopListening(obj: object, name: string, callback: function): Events Tell an object to stop listening to events. |
|
public |
Trigger callbacks for the given event, or space-delimited list of events. |
|
public |
unbind(): * Delegates to |
From class Router | ||
public |
Stores the routes hash. |
|
public |
Execute a route handler with the provided parameters. |
|
public abstract |
Initialize is an empty function by default. |
|
public |
Simple proxy to |
|
public |
Manually bind a single named route to a callback. |
Public Constructors
public constructor source
Creates the routes delegated to the given methods specified.