Open thorn0 opened 9 years ago
that would be around here that something needs to change:
https://github.com/dotJEM/angular-routing/blob/master/src/route.ts#L357
The normalization is intentional, so /route/:a and /route/:b won't generate two routes where the second never will be used as they match the same thing.
That said, when it comes to parameters with converters, the arguments ofc. needs to be accounted for. I don't have much time these days as I have so many other things to work on, but feel free to propose a solution.
Let's try to configure two routes: 1)
{regex(^\w+$):foo}/{regex(^\d+$):bar}
2){regex(^\w+$):foo}/{regex(^[a-z]+$):bar}
The only difference between them is inside the second regex. If we try to open a URL that matches the first route, we'll see that this route can't be found. If we look into
$route.routes
in the console, we'll see something like:Only one entry instead of two.