router.execute

executerouter.execute(callback, args, name) This method is called internally within the router, whenever a route matches and its corresponding callback is about to be executed. Return false from execute to cancel the current transition. Override it to perform custom parsing or wrapping of your routes, for example, to parse query strings before handing them to your route callback, like so: var Router = Backbone.Router.extend({ execute: function(callback, args, name) { if (!loggedIn) {

Router

constructor / initializenew Router([options]) When creating a new router, you may pass its routes hash directly as an option, if you choose. All options will also be passed to your initialize function, if defined.

route:[name] event

"route:[name]" (params) â Fired by the router when a specific route is matched.

route event

"route" (route, params) â Fired by the router when any route has been matched.

reset event

"reset" (collection, options) â when the collection's entire contents have been reset.

request event

"request" (model_or_collection, xhr, options) â when a model or collection has started a request to the server.

remove event

"remove" (model, collection, options) â when a model is removed from a collection.

model.values

values

model.validationError

validationErrormodel.validationError The value returned by validate during the last failed validation.

model.validate

validatemodel.validate(attributes, options) This method is left undefined and you're encouraged to override it with any custom validation logic you have that can be performed in JavaScript. By default save checks validate before setting any attributes but you may also tell set to validate the new attributes by passing {validate: true} as an option. The validate method receives the model attributes as well as any options passed to set or save. If the attributes are valid, don't return anythin