Javatpoint Logo
Javatpoint Logo

Backbone.js Router.extend()

The Backbone.js router extend method is used to extend the router class and create new constructor inherited from the Backbone.Router. It defines some triggered actions when specific URL fragments are matched and provides routes for those actions.

Syntax:

Parameter explanation:

  • properties: It specifies the instance properties for the router class.
  • classProperties: It specifies the class properties that are attached to the router's constructor function.

Let's take an example.

See this example:

Test it Now

Output:

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

BackboneJS extend Model
Next TopicBackbone.js Routes





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