Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BrowserHistory

A history implementation that uses the browser's history API. This class is essentially a wrapper around the browser's history API that conforms to the History interface used by the router.

see

https://developer.mozilla.org/en-US/docs/Web/API/History HTML5 History API

Hierarchy

Implements

Index

Constructors

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: State): void
  • Push a new entry to the history stack with the given path and state.

    Parameters

    Returns void

  • replace(path: string, state: State): void

Generated using TypeDoc