PathLocationStrategy vs HashLocationStrategy in web apps

For me the main difference is that the PathLocationStrategy requires a configuration on the server side to all the paths configured in @RouteConfig to be redirected to the main HTML page of your Angular2 application. Otherwise you will have some 404 errors when trying to reload your application in the browser or try to access it using a particular URL.

Here is a question that could give you some hints about this:

  • When I refresh my website I get a 404. This is with Angular2 and firebase.

Hope it helps you,
Thierry

Leave a Comment