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

Missing required variables are not detected #17

Open
seydu opened this issue Dec 3, 2015 · 0 comments
Open

Missing required variables are not detected #17

seydu opened this issue Dec 3, 2015 · 0 comments

Comments

@seydu
Copy link

seydu commented Dec 3, 2015

When a required path variable is not provided the router leaves the token in the generated url.
Say I have a route with the uri /page/{id}/edit. If I pass an empty params argument the generated uri will be /page/{id}/edit.
I think it is more helpful to detect the missing parameter and raise an error.

I see two options:
1/ Compile the routes server side and add the variables in the exported content
2/ Write JS code that compiles the route (maybe not a complete compilation as it is done server side, but extract enough information for this use case).

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

1 participant