Deploying An Angular App to Heroku

Configuring the Router


There are a few different ways that routing is handled in single page applications, and a common one is to use the hash fragment. The default in Angular is to use PathLocationStrategy which omits the hash. This allows for nicer looking URLs, but it also causes issues when navigating directly to routes. Let's configure our Node server to properly handle PathLocationStrategy routes.