I am using Google Chrome version 52 and I want to be able to run my application locally without a server by accessing index.html.
I am able to hit the landing page of my application. However, when I try to navigate to another page or click on any buttons, it is unable to work.
I have tried many ways, such as:
- Add script before import reference one and reference two
- Changing base href from / to ./
- Changing router configurations to use hash and changing base href to
<script>document.write('<base href="' + document.location + '" />');</script>
- Using
ng build --prod --allow-file-access-from-files
This is the exact error I faced:
I have been trying for a day, would really appreciate if someone could help.
I do not wish to run a web server and I have to make it work on Chrome.
Edited: Works on Safari
Does not work on Chrome, Firefox, Opera, IE, Microsoft Edge
Thank you!