Interface HistoryServiceV3

Hierarchy

  • HistoryServiceV3

Properties

history: History

The consumer's own history. When location changes are applied to this history, no other consumer histories are affected.

historyKey: string

The history key that has been assigned to the consumer. It can be used to create a ConsumerLocation.

rootHistory: History

Allows special consumers, like overarching navigation services, to change the full root location. To create a new root location, it is recommended to use the createNewRootLocationForMultipleConsumers method.

Methods

  • Creates a new root location from multiple consumer locations. The returned location can be used for the push, replace, and createHref methods of the rootHistory. Important: For push and replace calls make sure to pass the returned state property as a second argument, e.g.:

     const {state, ...to} = historyService.createNewRootLocationForMultipleConsumers({...});

    historyService.rootHistory.push(to, state);

    Parameters

    Returns Omit<Location, "key">

Generated using TypeDoc