-
Notifications
You must be signed in to change notification settings - Fork 688
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
How do you make the 'hash' example work when { hashbang: true }? #231
Comments
The #! is very dodge, for example if you type in the addressbar the following http://somesite.com/test#!/some-route it will work, but if you do http://somesite.com/test/#!/some-route (slash after test) it will not find the route. So in your URLS do not have a slash after before the #!, I do not know if this will get fixed, I can probably look at it too. |
Ok just to follow up, do not rely on build in { hashbang: true } rather make page.base('/#!'), this seems to solve all issues so far. |
Thanks @TitanKing this sure helped! |
Not sure if this affects you, but when I disable {hashbang: true} and set page.base("/#!") and have a url like localhost/~myuser/somepath/ then when I load the url, I get http://localhost/#!/~myuser/somepath/ which obviously fails on reload. Without the leading slash in the base, I get http://localhost/~myuser/somepath/#!/~myuser/somepath/ I'm having some real problems with #!, which is a pity because it's the best feature for me in page.js. I'll try to submit some CRs. |
This is really weird behavior. |
I added page('/~myuser/somepath/', function () {
app.route = 'home';
}); to my polymer routing.html file, it's ugly but at least it loads, using |
I meet the same problem, this is how I solve, awkward but works
After this, use Will pagejs attempt to fix this ? |
The question says it all. I'm trying to make the example under
examples/hash/
work the same way it does, only using the{ hashbang: true }
option, but no avail.I've also tried setting
<base href="/hash/">
, but that seems to get into an infinite redirection. After that, removingpage.base('/hash')
seems to do the trick, but then the location bar displayshttp://localhost:4000/hash/#!/hash/
and the#
and#subsection
links stop working properly.How can I do this ?
Thanks
The text was updated successfully, but these errors were encountered: