Docs (4.0.0)
class NavigationTarget constructor

new NavigationTarget

Creates a new navigation target object.

constructor(target?: string | LazyString | {
    getNavigationTarget(): NavigationTarget;
} | Partial<Pick<NavigationTarget, "pageId" | "detail" | "title">>, detail?: string, title?: StringConvertible)

Notes

  • This constructor can be used to create a new navigation target, from a variety of input types.
  • If the target is a string or LazyString object, it’s parsed as a URL-like path (e.g. page or page/detail).
  • If the target is an object with a getNavigationTarget method, the method is called to get the target.
  • Otherwise, the target is assumed to be an object with (optional) pageId, detail, and title properties. Further parameters can be provided to override these properties.

Parameters

  • target — The navigation target as a string or object
  • detail — Additional detail for the navigation target
  • title — The title of the navigation target, overriding the title provided if the target is an object

Errors

  • This constructor throws an error if the target is a string and starts with a dot (relative paths are not allowed).

Related