Home » Backbone.js Histroy

Backbone.js Histroy

by Online Tutorials Library

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:

You may also like