I recently developed an angular2 application and successfully deployed it.
The app loads correctly but takes some time to do so, after which I can navigate to different components.
However, when I try to access a component directly by typing the address in the URL:
www.sample.com/about
I receive a 404 error message.
Even when I create a production bundle using ng build --prod
, the dist
folder is created properly and I am able to navigate to different components using links only.
Unfortunately, I am unable to access components directly from the URL on my local system as well.
I am currently using http-server
.
Do you know if there are any additional configurations needed to resolve this issue?