Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
it does not work when i reload the browser after navigating to a route. #519
In angular 7, On running the dist on local machine , for the first time web page is loading. And when on reloading or hit the url, the page throwing the error.
I am used this link to run on the local machine
How to run the Dist Folder on Local Machine in Angular 6?
On Reload and for hit the url I am using .htaccess file. but Its not work.
I took the template build with command ng build --prod
I changed in index.html href="/browser/"
For run on the local machine I am used http-server.
First install the package globally using command
npm install http-server -g.
Then inside the project directory(in the terminal) just run
No error, it just does not direct you to index.html for routes. This works for me with nginx:
@NikitaPooja is the error you're seeing when you say "the page throwing the server error" actually a 404 error, or is it an actual server error?