Open dandv opened 10 years ago
What's the use case?
Off the top of my head: supporting legacy URLs.
To support legacy URLs, we should rather create another option, called legacy
that automatically redirects from every route specified there to path
. The solution above will allow to enter that two URLs at the same time which is not definitely what we might expect.
+1
I have an app, which uses same thing for various route, just minor changes in the helpers
for example
So, for now, I have to write the same thing 3 times instead of once, and would reduce the code base.
Just a little hint. Thanks
Hey !
Any updates on this one ?
A use case could simply be to make these routes the same :
You can do something like this to match the routes :
this.route('home', {
path: /^(\/home|\/)$/
});
But the issue is that I'm not able to use :
<a href="{{ pathFor 'home' }}">Home</a>
As the path is a REGEX
This proposed path format (using arrays) would be a great help in my opinion. (and pathFor would take the first element in the array)
Google autosuggests "iron router multiple" -> ""iron router multiple paths", but I haven't found documentation about this, or an SO question.
Something like this would be useful: