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

Strange redirects using $.route #58

Closed
p3k opened this issue Sep 7, 2011 · 1 comment
Closed

Strange redirects using $.route #58

p3k opened this issue Sep 7, 2011 · 1 comment

Comments

@p3k
Copy link

p3k commented Sep 7, 2011

When I define e.g. $.route('zone/:id', {id: 1}) and the corresponding event listener $.route.bind('change', function() { /* ... */ }) I get strange redirects for certain routes:

  • #zone is redirected to #!zone/undefined&one=
  • #!zone is redirected to #!zone/undefined&zone=
  • #zone/1 is redirected to #!zone/undefined&one%2F1=
  • #!zone/1 is redirected to #!zone/
  • #!foobar is redirected to #!zone/undefined&foobar=

#!zone/2, #!zone/3 etc. work as expected.

@justinbmeyer
Copy link
Member

This isn't a bug right now ... just maybe not what you expect.

Only routes like #! work.

#!zone/ should work for you, but it doesn't ignore the /.

I think the only problem is it not respecting #!zone, however you can do this like:

$.route('zone',{id: 1})

This might not be ideal. You can re-open this as a feature request.

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