Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: routie.back(), routie.next() #35

Open
akaRem opened this issue Dec 20, 2014 · 4 comments
Open

feature request: routie.back(), routie.next() #35

akaRem opened this issue Dec 20, 2014 · 4 comments
Labels

Comments

@akaRem
Copy link

akaRem commented Dec 20, 2014

it would be great to have back and next method for navigating through history

@akaRem
Copy link
Author

akaRem commented Dec 20, 2014

I've made like this:

routie.back = function () {
  if (document.referrer.indexOf(window.location.host) >= 0) {
    window.history.back();
  }
  else {
    routie('')
  }
};

@akaRem
Copy link
Author

akaRem commented Dec 20, 2014

Well, now I think, my idea looks bad.
Routie should remember every changed hash and navigate through its history

@benplum
Copy link

benplum commented Jan 3, 2015

What's wrong with using window.history.back() and window.history.forward()? These should work out of the box.

@universalhandle
Copy link

I haven't dug into why, but in cordova window.history.back() and window.history.forward() don't seem to work -- at least not on the emulated Nexus 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants