#routing issue only when deployed

5 messages · Page 1 of 1 (latest)

blazing kernel
#

I have a weird issue where my routing doesn't work once deployed. In my routing module, I have empty paths and wildcard paths redirecting to my auth path. This works fine when running locally. So if I enter localhost:4200/invalidroute it will redirect to localhost:4200/auth. However once deployed, it doesn't redirect. It will however redirect to auth if I do domain.com/invalid/invalid. Anyone know why this happens and how to make deployed app match the behavior of app when running locally? This is angular 16.

shell path
#

How do you redirect to invalid route?

blazing kernel
#

{path: '**', redirectTo: 'auth'}

flat hatch
#

in the latest version of angular pathMatch is required i think

#

it wont throw any errors at design time but at runtime will fail if pathMatch is missing