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

Add support to Catch-All routes #1147

Closed
wants to merge 1 commit into from
Closed

Add support to Catch-All routes #1147

wants to merge 1 commit into from

Conversation

andresmoschini
Copy link

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.

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.**
@thomseddon
Copy link

Tested working, (thanks)

@mhevery
Copy link
Contributor

mhevery commented Sep 4, 2012

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@ghost ghost assigned mhevery Sep 4, 2012
@andresmoschini
Copy link
Author

I have accepted the contributor agreement.

Regarding adding tests, I could, but maybe in about a week or two because I am a little busy right now.

@Enome
Copy link

Enome commented Oct 1, 2012

Would like to see this feature in angular.

@pkozlowski-opensource
Copy link
Member

It would be very useful addition to angular's routing system. It is a pity that this PR doesn't have an associated test nor documentation changes :-(

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

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

On top of this I'm not clear if those catch-all routes should be supported only at the end of a URL or in a middle as well. Test and documentation changes should explain this.

@andresmoschini are you planning to add tests / documentation to this PR?

@andresmoschini
Copy link
Author

I am sorry, but we are not using Angular right now and I am a little busy to add test and documentation.

Right now both edit/color/:color/largecode/*largecode and edit/largecode/*largecode/color/:color/ works.

@lrlopez
Copy link
Contributor

lrlopez commented Nov 11, 2012

I also find it a rather useful improvement. @andresmoschini and @pkozlowski-opensource , would you mind if I implement the required tests and the documentation?

@pkozlowski-opensource
Copy link
Member

@lrlopez Luis, yes, I saw many people asking for this feature and it could be quite useful addition. Unfortunately this can't be merged as-is, without tests and documentation. So yes, if you've got time and energy to work on this a PR would be welcomed. You can either liaise with @andresmoschini or open a completely new PR.

@lrlopez
Copy link
Contributor

lrlopez commented Nov 11, 2012

You're right. I think the best course is to pull @andresmoschini 's commit in my own repo and then add the tests/documentation changes.

I'll issue a new PR over the master branch and publish a link here. Thanks!

@andresmoschini
Copy link
Author

Thanks @lrlopez !,

Please let me know when you push the changes to update my project with the official version. Feel free to change the API, I mean, I am not sure if * was a good decision about how to identify catch-all sections.

@pkozlowski-opensource
Copy link
Member

A new PR #1559 suppresses this one.

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

Successfully merging this pull request may close these issues.

None yet

6 participants