Options
All
  • Public
  • Public/Protected
  • All
Menu

The History class keeps track and manages a stack of routes that the user has navigated to in their session.

An item can be pushed to the top of the stack using the push method. An item in the stack has a name and a URL. The name need not be unique; if it is the same as the item before it, that will be overwritten with the new URL. In this way, if a user visits a discussion, and then visits another discussion, popping the history stack will still take them back to the discussion list rather than the previous discussion.

Hierarchy

  • History

Implements

Index

Constructors

constructor

Properties

Protected stack

stack: HistoryEntry[] = []

The stack of routes that have been navigated to.

Methods

back

  • back(): void

backUrl

  • backUrl(): string

canGoBack

  • canGoBack(): boolean

getCurrent

getPrevious

home

  • home(): void

push

  • push(name: string, title: string, url?: string): void
  • Push an item to the top of the stack.

    Parameters

    • name: string

      The name of the route.

    • title: string

      The title of the route.

    • url: string = ...

    Returns void

Generated using TypeDoc version 0.22.10