Aberdeen - v1.0.3
    Preparing search index...

    Class Route

    The class for the singleton route object.

    Index

    Constructors

    Properties

    Constructors

    Properties

    aux: Record<string, any>

    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.

    depth: number = 1

    The navigation depth of the current session. Starts at 1. Writing to this property has no effect.

    hash: string

    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.

    id: Record<string, any>

    The hash interpreted as search parameters. So "a=x&b=y" becomes {a: "x", b: "y"}.

    mode: undefined | "push" | "replace" | "back"

    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.
    nav: "push" | "load" | "back" | "forward" = 'load'

    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.
    p: string[]

    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.

    path: string

    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.

    search: Record<string, string>

    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.