-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fixed generation of url with optional parameter and without default value #523
Conversation
Fixed the url generation at client side when a route contains optional parameter. Current implementation of dotvvm routes and url generation a little bit messy. Specification of routes format doesn't exists (except source code). There exists two implementations (client and server side) which generates urls. To correct it I would suggest these steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is probably going to work. Thanks.
I think that you are right with the specification, it should contain precise grammar of the route strings + the examples explaining the grammar. Actually, I'm afraid that we will need to write specification of almost everything - technically, there are no bugs in dotvvm, because the source code is the specification :) About the translation fo |
It sounds good to me. But we should file another issue to solve this. |
Merging this PR as a bug fix. I have created separate issues for the translation of UrlBuilders #526 and specification riganti/dotvvm-docs#49 |
Fixed bug in generating url and added UI tests.
Currently there is a bug with generating url with optional parameter and without specifying default values
(client side rendering)
e.g. Url
ControlSamples/Repeater/RouteLink/{Id?}
generates/ControlSamples/Repeater/RouteLink/%7BId?}
There is still different behavior when rendering at client/server side:
ControlSamples/Repeater/RouteLink/
ControlSamples/Repeater/RouteLink