Angular Routing issue: Route parameter redirects to incorrect path

36 Views Asked by At

I'm facing an issue with Angular routing where I'm trying to navigate to a specific route that includes a route parameter, but it redirects me to a different path instead. I have a ToursComponent that displays a list of tour cards, and when I click on a "Get More" button for a specific tour, I want to navigate to the corresponding TourDetailsComponent with the tour's ID or title as a route parameter.

However, instead of navigating to /tours/:tourIdOrTitle, it redirects me to /home path. I have double-checked my routing configuration and ensured that the correct component is associated with the route, but the issue persists.

I have created a repository on GitHub

Any help or suggestions on how to resolve this routing problem would be greatly appreciated. Thank you!

0

There are 0 best solutions below