Using backbone, is it any way to store some data in the history so it can be retrived when a back is called?
In a none backbone application I the application will be something like the following. When executing an action:
//When doing some action
history.pushState(mycurrentData, title, href)
and the following to retvive the current Data in case of back:
function popState(event) {
if (event.state) {
state = event.state;
//get my data from state
}
}
window.onpopstate = popState;
I need to apply the same behaviour on my backbone app.
Thanks