I have an URL like this:
http://localhost:3000/#/contrat?id=8171675304
And I'm trying to redirect it to:
http://localhost:3000/contrat?id=8171675304
I tried the following:
window.location.assign(hash.replace('#/', ''));
And this code too : window.location.replace(hash.replace('#/', ''));
Both of these solutions doesn't redirect as intended & the page end up in http://localhost:3000
Edit:
When I copy & paste the URL both of solutions above work! But when I click on the link( http://localhost:3000/#/contrat?id=8171675304 ) on the browser it redirects to http://localhost:3000