I'm trying to create a route config that will match the path :id/compA, otherwise fallback to the route that has the :tab route parameter. The :tab route always seems to match regardless of order.
How do I do this?
Thanks!
const routes: Routes = [
{
path: ':id/compA',
component: SpecificComponent
},
{
path: ':id/:tab',
component: GeneralComponent
}
];
:id/:tabtakes precedence over the other one. I guess you might wanna redesign your routes and components. But anyway, 2 consecutive parameters in the routes don't look like a good idea.