Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

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:

Test it Now

Output:

Save the above code in route.html file and open this file in a new browser.

BackboneJS route Model1

Note: In the above example, we select route 1. The URL will be changed accordingly as you select route2 or route3.

BackboneJS route Model2




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA