Reloading page on Angular-Wakanda webserver gives 404

40 Views Asked by At

I'm guessing that when you reload the page, the Wakanda server is looking for an absolute path to a file in the web root. So if I reload the page https://my-site.com/home/products, there isn't an actual file at that location since I've used the Angular router to virtually create that path.

Is there anything I can do to fix this?

1

There are 1 best solutions below

0
NAMS On BEST ANSWER

I found the answer in another stackoverflow post:

In short, in app.module.ts, make sure your router is set up to use the hash in its pathing: RouterModule.forRoot(routes, { useHash: true })