Closed JonatanSalas closed 7 years ago
Is this what you're looking for?
routes.add('/:slug([a-z]+)_:id', 'detailpage')
routes.add('/:slug', 'otherpage')
More patterns info here: https://github.com/pillarjs/path-to-regexp
Yes! That was exactly what I was looking for! Thank you very much!
Hi!
I have two types of routes in my app:
/some-url
/some-url_withId
If I express them as a pattern, I got the following:
/:id
The trouble is that the components that render those urls are different. There's a way to get the same url pattern but differ the component to render?