back
back(
target?):void
Defined in: route.ts:246
Try to go back in history to the first entry that matches the given target. If none is found, the given state will replace the current page. This is useful for “cancel” or “close” actions that should return to the previous page if possible, but create a new page if not (for instance when arriving at the current page through a direct link).
Consider using up to go up in the path hierarchy.
Parameters
Section titled “Parameters”target?
Section titled “target?”RouteTarget = {}
The target route to go back to. May be a subset of Route, or a string (for path), or an array of strings (for p).
Returns
Section titled “Returns”void