Skip to content

Cannot use alias on / route #1427

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

Closed
TynesideGroup opened this issue May 17, 2017 · 4 comments
Closed

Cannot use alias on / route #1427

TynesideGroup opened this issue May 17, 2017 · 4 comments
Labels

Comments

@TynesideGroup
Copy link

TynesideGroup commented May 17, 2017

Version

2.5.3

Reproduction link

http://jsfiddle.net/9r6xhqbp/31/

Steps to reproduce

  • Use an alias on base / route (alias does not work)
  • Add a child to the aliased / route (alias child does not work)
  • Give the aliased child route a name (throws "Duplicate named routes definition" warnings)

What is expected?

  • Alias on base / route should work as expected
  • Child routes on aliased / route should work as expected
  • No "Duplicate named routes definition" warnings should be thrown on aliased base / child routes that have a name

What is actually happening?

  • Alias on base / route does not work
  • Children on aliased base / route do not work
  • "Duplicate named route definition" warning is thrown for aliased base / child routes that have a name
@posva posva changed the title Alias on base / route does not work, and throws "Duplicate named routes definition" warnings if using named child routes Cannot use alias on / route May 17, 2017
@posva
Copy link
Member

posva commented May 17, 2017

As a workaround, you can set the path as /home and use / as the alias instead
But this looks like a bug, thanks!

@posva posva added the bug label May 17, 2017
@TynesideGroup
Copy link
Author

TynesideGroup commented May 17, 2017

Thanks @posva. Unfortunately the workaround doesn't solve the issue of the "Duplicate named routes definition" warning in the console when using named child routes, but I can live with that for now!

Thanks for confirming it is indeed a bug - look forward to seeing a solution soon 👍

@posva
Copy link
Member

posva commented May 17, 2017

The warning does gets suppressed on the fiddle

@TynesideGroup
Copy link
Author

Yep, my bad - my Console was retaining history.

Would be nice to be able to declare / as the root path and alias it to something else rather than vice-versa though - at first glance to another developer it could appear my codebase doesn't have a base / route.

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

2 participants