angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Need partial path matching. #362

Open ghost opened 9 years ago

ghost commented 9 years ago

I would like to pass an arbitrary set of path segments to a component.

path: '/candy', component: candy

This should match /candy, /candy/bars, /candy/bars/chocolate ...

Unfortunately it fails unless you have an exact match and there are too many different sub-categories to parameterize each segment in the routing configuration. I want anything starting with /candy to use the Candy component, and let Candy extract the dynamic portion itself. If we added a path specifying /candy/bars, then we could have a "bars" specific component; otherwise, use the best match.