router
router copied to clipboard
Add option to replace navigation state history on navigation
Let's say you want to trigger a navigation outside of a router lifecycle callback, then it seems the only vaadin-router API available is Router.go(pathname)
. Unfortunately, this last pushes the new path in the window history and does not offer an option to replace it (pushState
vs replaceState
).
It would be really convenient to add an option or a function that allows replacing the old history state on navigation triggering.
In case of a form with a cancel button, a shortcut (e.g. Router.goBack()
) would be also really convenient.