forked from flatiron/director
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Any chance we can get support for a call that looks something like this?
// does not add an entry into the browser history
router.replaceRoute('/new/route');
Under the hood, director is using window.pushState() on the router.setRoute() call which will push a new entry onto the window history stack. This makes the native browser history inflexible in certain cases.
eg. if i only want to change query params (user isn't taken to new page)
previous url: example.com/home
current url: example.com/new/route
router.setRoute('/new/route?new=true');
Now, if the user clicks back button, they'll be taken to example.com/new/route which is the same page sans any query param filter. I would like the control to navigate them back to example.com/home instead.
Also, this has been requested by a few of people:
flatiron#316
Metadata
Metadata
Assignees
Labels
No labels