Background: Angular 4, ng cli, RouterModule, useHash: true.
when I browse to my app using http://server/index.html
it resolves to http://server/#/
(index.html is omitted from the url) additionally every routing navigation also omits the index.html from the url.
This is problematic for how my app is hosted, I need to keep index.html in the url. How can I configure angular to keep it?
You can try:
ng build --prod --base-href /app/index.html
but it might affect relative path to your assets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With