How to use PathLocationStrategy on localhost?
问题 I'm working on an Angular 4 web app and I need to use PathLocationStrategy (not HashLocationStrategy ). The only problem with PathLocationStrategy is that when I refresh a page, I instantly get a blank page with 404 errors in the console... Which is normal with PathLocationStrategy . Once on a server, I can fix that by redirecting the routes to point on index.html. But how to fix this issue on localhost when I launch my app with ng serve ? It would be ideal since I'm working in "livereload",