Reputation: 1131
I have Backbone routes like so:
route1 : http://localhost/#dash-campaigns/campaigns
route2 : http://localhost/#dash-campaigns/create
when i click on the browser back button when the user is in route2, the corresponsding routehandler functions are not called
My routes are defined as follows:
routes: {
"": "defaultRoute",
"dash-campaigns/:query": "campView"
}
This is basically happening becoz both of them have same hash, but note that the complete url is different. How do i solve this problem...?
Upvotes: 0
Views: 52
Reputation: 10518
You need to enable HTML5 pushState
to take advantage of hash events for route changes.
Upvotes: 0