-
Notifications
You must be signed in to change notification settings - Fork 3k
Optional route parameters with prefix #2061
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
Comments
For the date, why not use dashes? And maybe use dashes where you think you have to use slashes? |
yep, I could do it, but I have to maintain the retrocompatibility with the old urls.. route/to/!parPrefix1/paramValue1/!parPrefix2/paramValue2 If anyone is interested I can make a fork |
Doesn't that then break the old urls since you are adding new characters? |
it breaks the segment starting with ! because it recognize them as prefix of the following parameter.. url: "route/to/parPrefix1/:param1/parPrefix2/:param2", this way if the param1 has the default value, the parPrefix is squashed too.. I'm going to commit my changes.. and omitting the part of the ! placeholder |
Closing due to inactivity |
I need to register to a state, a route where the parameters has a prefix and a slash (route/to/parPrefix1/:paramValue1/parPrefix2/:paramValue2) and these parameters are all optional, so if the parameter1 is not set, the resulting url should be: route/to/parPrefix2/value2
How can I handle this case?
Then I have a second issue: the date should be specified like this: 20/10/2015 If i solve the first point I could set a parameter per date part, however, is there a more elegant solution?
a real case url: /risultati/destinazioni/:destinations/localita/:locations/partenza/:startingDate/ritorno/:returningDate/adulti/:adults/bambini/:children/eta/:childrenAges/aeroporti/:airports/flessibile/:flexDate/
I red this issue, but it seems that my case is not handled.. am I right?:
#108
(I've post this here too: http://stackoverflow.com/questions/31006196/optional-route-parameters-with-prefix-angular-ui-router)
The text was updated successfully, but these errors were encountered: