Skip to content

crelte / routing / RouteOrigin

Type Alias: RouteOrigin

ts
type RouteOrigin = "init" | "manual" | "preload" | "click" | "pop" | "replace" | "push";

RouteOrigin represents the origin of a route. This type is non-exhaustive and might expand in the future.

  • 'init': is set on the first page load
  • 'manual': is set when a route is triggered manually via Router.open
  • 'preload': is set when a route is preloaded via Router.preload
  • 'click': is set when a route is triggered by a click event
  • 'pop': is set when a route is triggered by a popstate event (back/forward)
  • 'replace': is set when a route is replaced via Router.replaceState
  • 'push': is set when a route is pushed via Router.pushState

Note

replace and push will not call loadData