I have a singlepage application build with Angular 9 and I would like to use urls withoug a hashtag to navigate.
I enabled pushState / HTML5 mode by defining useHash
RouterModule.forRoot(routes,{useHash: false})
and in the index.html the "base entry:
<head>
<base href="/" />
so far everything looks ok, but i see, that when requesting a site directly: instead of:
http://localhost:4200/#/upload?transactionId=100603804
using
http://localhost:4200/upload?transactionId=100603804
the whole angular application is reloaded again from the server. How could it be arranged, that i can use the links without '#' and also to avoid the reloading?
best regards
shane
/upload). A rewrite rule must be written so that the server will understand that it should actually serveindex.htmlthe whole angular application is reloaded again from the server? If you type that in the url and press enter, of course it will reload the whole application. But if place a button that triggersrouter.navigate(), it will just navigate without whole reloading