Interface Handle<T, TInput>

Page navigation parameter value handle.

Holds and maintains parameter value.

Created by create method.

Type Parameters

  • T

    Parameter value type.

  • TInput

    Parameter input type.

Hierarchy

  • Handle

Methods

  • This method is called when the page this parameter created for is entered.

    Parameters

    • page: Page

      Entered page.

    • when: "replace" | "open" | "enter" | "return" | "init"

      When the page is entered. Either init, open, replace, enter, or return.

    Returns void

  • This method is called when the page this parameter is created for is removed from navigation history.

    The handle won't be accessed after this method call.

    Returns void

  • Puts page parameter value.

    This method is called when re-assigning page parameter. It is called when page parameter is assigned already and can be used to update it. The update logic is up to the implementation.

    Parameters

    • input: TInput

      Parameter input to use when updating its value.

    Returns void

  • This method is called when page navigation aborted and target page won't be reached.

    The handle won't be accessed after this method call.

    Parameters

    • at: Page

      The page the browser remains at.

    Returns void

  • Transfers parameter to target page.

    This is called right before LeavePageEvent is fired for each parameter handle of current page.

    Returns

    New parameter handle instance for target page, or undefined if nothing to transfer.

    Parameters

    • to: Page

      A page to transfer parameter to.

    • when: "enter" | "pretend" | "pre-open" | "pre-replace" | "return"

      When the transfer happens. Either pretend, pre-open, pre-replace, open, or return. return is used when return to page generated by another app version. E.g. from the page that has been reloaded.

    Returns undefined | Handle<T, TInput>

Generated using TypeDoc