Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface History

A common interface for history implementations.

Hierarchy

  • History

Implemented by

Index

Methods

  • back(): void
  • Go back to the previous entry in the history stack. Does nothing if there is no previous entry. Equivalent to calling history.go(-1).

    Returns void

  • forward(): void
  • Go forward to the next entry in the history stack. Does nothing if there is no next entry. Equivalent to calling history.go(1).

    Returns void

  • go(delta: number): void
  • The position in the history to which you want to move, relative to the current page. A negative value moves backwards, a positive value moves forwards. So, for example,history.go(2) moves forward two pages and history.go(-2) moves back two pages. If no value is passed or if delta equals 0, it has the same result as calling location.reload().

    Parameters

    • delta: number

    Returns void

  • push(path: string, state?: unknown): void
  • Push a new entry to the history stack with the given path and state.

    Parameters

    • path: string
    • Optional state: unknown

    Returns void

  • replace(path: string, state?: unknown): void
  • Replace the path and the state of the current entry in the history stack.

    Parameters

    • path: string
    • Optional state: unknown

    Returns void

Generated using TypeDoc