I want to achieve something like this /products shows all the products and /products/:category shows all the products related to a specific categor
/products
/products/:category
You could also define a redirect to a specific path:
{ path: '**', redirectTo: '/home', pathMatch: 'full' },
where /home is the route you want to redirect to.
/home
path: '**' resolves all paths which are not defined
path: '**'