The Backbone.JS Router Route() method creates a route for the router, manually.
Syntax:
Backbone.Router.Route (route, name, callback)
Parameters:
route: This parameter is used to specify the routing string.
name: This parameter is used to specify the parameter’s name for the router.
callback: This parameter is used to specify the router’s name.
Example:
Example
Output:
● Route 1 ● Route 2 ● Route 3 ● Route 4 ● Route 5
Explanation:
In the above example the Route() method manually creates a route for the router.