Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feat(routeParams): Add support to catch-all parameters in routes #1559

Closed
wants to merge 3 commits into from

Conversation

lrlopez
Copy link
Contributor

@lrlopez lrlopez commented Nov 12, 2012

This allows routeProvider to accept parameters that matches substrings even when they contain slashes if they are prefixed with an asterisk instead of a colon.

This PR introduces a new syntax for route params, so we would have:

  • :param for a single param
  • *param for catch-all params

For example, routes like edit/color/:color/largecode/*largecode will match with something like this http://appdomain.com/edit/color/brown/largecode/code/with/slashs

It also matches catch-all routes in the middle of the path.

andresmoschini and others added 3 commits July 16, 2012 13:17
It allows to accept routes like `edit/color/:color/largecode/*largecode` to match with something like this 
`http://appdomain.com/edit/color/brown/largecode/code/with/slashs`

**I really need it because my app ids contains slashs.**
This allows routeProvider to accept parameters that matches substrings even when they contain slashes if they are prefixed with an asterisk instead of a colon. For example, routes like edit/color/:color/largecode/*largecode will match with something like this http://appdomain.com/edit/color/brown/largecode/code/with/slashs.
@lrlopez
Copy link
Contributor Author

lrlopez commented Nov 12, 2012

This PR is related to #1147 which was created by @andresmoschini and assigned to @mhevery. I've just added some tests and documentation.

I'd like not to have merged 'master' branch to better isolate the changes, but I needed Testacular support for the tests. Also, I've already signed the CLA.

I hope everything is ok with this PR.

@pkozlowski-opensource
Copy link
Member

@lrlopez I think that something went wrong with git operations, no? Especially the 09b0825 looks bad.

Could you try to prepare a PR with only one, single commit, having all the changes that needs to be done for this PR? This one single commit should have both @andresmoschini changes and your changes. With 3 commits like this it is really hard to see what is changing in this PR.

@lrlopez
Copy link
Contributor Author

lrlopez commented Nov 12, 2012

Sure. I will prepare a new PR ASAP and close this one...

@lrlopez
Copy link
Contributor Author

lrlopez commented Nov 12, 2012

Closed because PR #1560 suppresses this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants