The auxiliary part of the browser history state, not considered part of the page identity. Changes will be reflected in the browser history using a replace.
The navigation depth of the current session. Starts at 1. Writing to this property has no effect.
An observable object containing search parameters (a split up query string). For instance {order: "date", title: "something"}
or just {}
. By default, updates will be reflected in the URL, replacing the current history state.
The hash
interpreted as search parameters. So "a=x&b=y"
becomes {a: "x", b: "y"}
.
As described above, this library takes a best guess about whether pushing an item to the browser history makes sense or not. When mode
is...
"push"
: Force creation of a new browser history entry."replace"
: Update the current history entry, even when updates to other keys would normally cause a push."back"
: Unwind the history (like repeatedly pressing the back button) until we find a page that matches the given path
and id
(or that is the first page in our stack), and then replace that state by the full given state.
The mode
key can be written to route
but will be immediately and silently removed.The navigation action that got us to this page. Writing to this property has no effect.
"load"
: An initial page load."back"
or "forward"
: When we navigated backwards or forwards in the stack."push"
: When we added a new page on top of the stack.Array containing the path segments. For instance []
or ['users', 123, 'feed']
. Updates will be reflected in the URL and will push a new entry to the browser history. Also, the values of p
and path
will be synced.
The current path of the URL split into components. For instance /
or /users/123/feed
. Updates will be reflected in the URL and will push a new entry to the browser history.
A part of the browser history state that is considered part of the page identify, meaning changes will (by default) cause a history push, and when going back, it must match.
The class for the singleton
route
object.