Using Backbone.history to go back
35,061
Solution 1
Unless the app uses the fancy-schmancy HTML5 pushState
events, I don't see a need for Backbone.History
here. Just use window.history.back()
.
Solution 2
Nowadays you can also use some more Backbone with Backbone.history.history
which provides you methods like .forward
, .go
and finally Backbone.history.history.back()
.
Author by
hamishtaplin
Updated on February 06, 2020Comments
-
hamishtaplin about 4 years
I have inherited a half-finished mobile app built using Backbone.js (which I have never used).
I need, quite simply, to send the user back when they click a back button.
Some brief research leads me to believe it has something to do with
Backbone.history
but I can't figure out what.Any ideas?