I have a search page where a couple of filters can be added. Each time a filter is added I would like to add this to the url, to make it shareable.
E.g.
-
A user visits the page. url is
my-url.com#search
. -
The user clicks on a filter to active it. The url should be updated to
my-url.com#search?filter-1=123
Now using something like this:
import { IRouter } from '@aurelia/router'
...
this.router.load('search', { parameters: { filter-1: '123' } })
The url can be changed. However, the page is reloaded and the view lifecycles are triggered. Is there a way to change the url without reloading and triggering lifecycles?
From the docs, Router Lite has transitionPlan: 'replace'
…, but I cannot find this on the core router.
Any Ideas?