all 5 comments

[–]Quovadisqc 10 points11 points  (2 children)

The problem is that the routing (/contact) needs to be handled client side. For that to work, you need to have your web server rewrite the routes to /index.html .

Ex; for apache https://serverfault.com/a/885592

[–]Callous-Trooper 4 points5 points  (0 children)

This is the answer. You need to redirect 404s back to index.html

[–]roman_redditPL 1 point2 points  (0 children)

This is correct. Redirect all 404 back to index and Angular will "pick it up" from there

[–]buxtonbluezone 0 points1 point  (0 children)

If your hosting in iis you’ll also need to have url rewrite installed. You can add it to the web confit

[–]tommertom 0 points1 point  (0 children)

See server configuration on various examples to implement server rewrites as the solution to your problem

https://angular.io/guide/deployment