Reputation: 443
I Have following routes in Backbone:
routes: {
// Default
's*query':'search',
'*actions': 'defaultAction'
},
with PushState = true
Router is working fine but when i am using browser back and forward button, query is coming as undefined:
app_router.on('route:search', function (query) {
this.passInData = query.split("?",2)[1];
LazyLoader.loadController([this.controllerMap.sc], this);
});
Any Help !!
Upvotes: 1
Views: 441
Reputation: 7746
The jQuery-BBQ Plugin will be perfect solution.
Plugin: http://benalman.com/projects/jquery-bbq-plugin/
Here the Article about it.
http://blog.pamelafox.org/2013/05/managing-history-in-backbone-widgets.html
Upvotes: 1