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

Ability to support trailing slash as a parameter to the Locations component #173

Open
meghprkh opened this issue Jun 16, 2016 · 3 comments

Comments

@meghprkh
Copy link

IMHO the locations component should have a boolean flag trailingSlash which when set allows all its children to have trailing slashes without having to explicitly specify (/) at the end of the path

@STRML
Copy link
Owner

STRML commented Jun 16, 2016

If you think that would be useful to you, please create a PR and I will review it.

@meghprkh
Copy link
Author

Sure. Will do it in my spare time, currently keen on completing my project. Leaving this issue open as of now.

@STRML
Copy link
Owner

STRML commented Jul 12, 2016

Note also that it's a bad habit to have two URLs refer to the same resource without a redirect. There was a similar issue in url-pattern, which this library uses.

You could set an onBeforeNavigation handler that checks if the current route has a trailing slash, and if it does, calls this.setPath() again with the trailing slash removed, and returns false so the original navigation is canceled.

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