Since the Angular update from version 14 to 15, we have had the problem that our nested router no longer finds the routes, which should obviously be there when the routing is triggered by a click in the application. However, if you call up the route via the URL, it can be found. We then went up to version 17 because we hoped that the problem might be fixed with a higher version. Unfortunately, this was not the case. For this reason, we have created a minimal version of the application in which the error is still reproducible.
Stackblitz (Link is only working when copy & pasted or after page reload for some reason)
Step by step:
- Step 1: Call route /orders/create/type
- Step 2: Click on the button (red rectangle)
- Step 3: See console.log (Error: NG04002: Cannot match any routes. URL Segment: 'orders/create/address')
- Step 4: Enter the route /orders/create/address in the url and call it up
- Step 5: The route is called successfully