Answer the question
In order to leave comments, you need to log in
Why does Backbone.Router stop working after using histoty.pushState?
Good afternoon!
The page has a backbone router of the following form (abbreviated version)
Controller = Backbone.Router.extend({
routes: {
"sendpm/:dialogWith": "sendpm"
},
sendpm: function(dialogWith) {
$("#popup-send-pm").simplePopup();
if (PM != undefined && typeof PM.init == "function")
PM.init(dialogWith);
// Загружаем информацию о пользователе
PM.getUserInfo();
}
});
controller = new Controller();
Backbone.history.start();
history.pushState('', document.title, window.location.pathname);
Answer the question
In order to leave comments, you need to log in
Make an empty route and use the backbone's navigate method on that route when the window closes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question