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

Doesnt seem to route properly when html5mode is activated #34

Open
HadrienPierart opened this issue Sep 13, 2015 · 1 comment
Open

Doesnt seem to route properly when html5mode is activated #34

HadrienPierart opened this issue Sep 13, 2015 · 1 comment

Comments

@HadrienPierart
Copy link

I can see this code in the server.js file :

var route = parse_qs(request.url)._escaped_fragment_;
var url = urlPrefix
  + request.url.slice(1, request.url.indexOf('?'))
  + '#!' + decodeURIComponent(route);
renderHtml(url, function(html) {
    response.statusCode = 200;
    response.write(html);
    response.close();
});

Clearly, this creates a route prefixed with '#!' which breaks my router which is configured for urls like localhost:8080/signup and not localhost:8080#!/signup.

This results in having only the / url supported and properly indexed. Any other url will simply render / content...
I tried to remove '#!' from your source code in the server to test it, and it works fine now.

This needs to be compatible with html5mode now.

Great work though, it served me a lot on multiple projects, thanks !

@jvgeee
Copy link

jvgeee commented Oct 10, 2016

Removing the #! fixed the problem for me, cheers!

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