router icon indicating copy to clipboard operation
router copied to clipboard

Add option to replace navigation state history on navigation

Open lpellegr opened this issue 6 years ago • 1 comments

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.

lpellegr avatar Oct 19 '18 22:10 lpellegr

In case of a form with a cancel button, a shortcut (e.g. Router.goBack()) would be also really convenient.

lpellegr avatar Oct 20 '18 21:10 lpellegr