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

Add option to turn off hashbangs and pushstate completely #24

Open
panthershark opened this issue Feb 21, 2014 · 7 comments
Open

Add option to turn off hashbangs and pushstate completely #24

panthershark opened this issue Feb 21, 2014 · 7 comments

Comments

@panthershark
Copy link
Member

In older browsers, there are 2 options for navigate

  1. use hashbangs
  2. replace location.href with the navigate url

Sometimes you just want #2 b/c it is simple. This ticket is to track allowing that.

@AllSpeeds
Copy link
Contributor

Passing in a path is another option that @cappslock asked for as well. Passing in an options hash would be cool.

@panthershark
Copy link
Member Author

I am messing with using html5-history-api polyfill to support the hashbangs. This fixes some of the self.root issues that exist outside of that Vast project we were working on.

https://github.com/devote/HTML5-History-API

@AllSpeeds
Copy link
Contributor

@tommydudebreaux, that sounds fantastic.

@panthershark
Copy link
Member Author

This is checked in and working in my projects. Before calling listen() on the router, load the history poly.

Here is the gist using Modernizr or yepnope. Any script loading solution will work.

(Modernizr || yepnope).load([
  {
    test : Modernizr.history,
    nope : '//cdnjs.cloudflare.com/ajax/libs/html5-history-api/4.0.2/history.iegte8.min.js'
  }
]);

@AllSpeeds
Copy link
Contributor

@tommydudebreaux, @lushchick and I are going to take a look at this today-ish. Are you planning to do a PR from your fork?

@panthershark
Copy link
Member Author

Once we get this working, yes I would like to. Before publishing to npm, I would like to pick off the rest of the tickets.

@panthershark
Copy link
Member Author

This is merged. Please post any issues here. Otherwise, I am bumping version and pushing it.

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

No branches or pull requests

2 participants