Javatpoint Logo
Javatpoint Logo

Backbone.js History

The backbone.js history serves as a global router, keeps track of the history, matches the appropriate route and triggers callbacks to handle events and enable routing in the application.

There is only method named "start" can be used to manipulate the Backbone.js history.

start:

The start method listens to routes and manages the history for bookmarkable URL's. When all of your Routers have been created, and all of the routes are set up properly then Backbone.history.start() is called to begin monitoring the hashchange events, and dispatching routes.

Syntax:

Parameter explanation:

options: The "options" specifies the parameters like pushState and hashChange used with history.

Let's take an example.

See this example:

Test it Now

Output:

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

BackboneJS History
Next TopicBackbone.js Sync





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