0👍
A web application? router.go(n)
is history.go(n)
so it’s the same limitations as that. It would be unsafe to expose a persons history to a website. Also, just because they’re home doesn’t mean they can’t go back and just because the user can go forward doesn’t mean it’ll navigate to something in your app. If you’re trying to replicate the forward and back button you’re going to have a bad time.
If it’s not a web app then you’d need to manually track the users history and splice and replace and push just like the browser does.
0👍
Have you enabled the HTML5-history-mode configuration? Documentation can be found here.
You may also need to enabled it in your server. If you’re using express, I’ve got this line in my server code:
app.use(require('connect-history-api-fallback')());
Source:stackexchange.com