After upgrading to the final release of Angular2, I encountered an issue with the HashLocationStrategy. Prior to the update, refreshing the page would fetch the related route with a hash (#) and reload the page. However, post-upgrade, any refreshed page results in the following error:
https://i.sstatic.net/u8yLk.png
It seems to be attempting to load http://localhost:3000/main/home
instead of
http://localhost:3000/#/main/home
.
Do you have any insights on why the HashLocationStrategy
suddenly stopped working? Should I import HashLocationStrategy
in my @NgModule
?