Home » Backbone.js router.route()

Backbone.js router.route()

by Online Tutorials Library

Backbone.js router.route()

The Backbone.js Route method is used to manually create a route for the router. It may be a routing string or regular expression. It appends the router parameter using slash followed by colons and parameter’s name.

Syntax:

Parameter explanation:

route: It specifies a routing string or regular expression.

name: It specifies the name of the router parameter.

callback: It specifies the name of the router, if callback argument is omitted.

Let’s take an example.

See this example:

You may also like