Method UseNavigate
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
UseNavigate(bool)
Returns a navigate function that pushes (or, when replace is true, replaces)
the given target path. The target may be
absolute (/foo) or relative (., .., ../sibling). Relative targets
resolve from the calling component's enclosing Outlet route level. Without one, the router uses
the current leaf route level when matches exist; otherwise it uses the current URL path, or the
root before the first location. Navigation is driven by Current.
public static Func<string, VelvetTask<NavigationResult>> UseNavigate(bool replace = false)
Parameters
replacebool
Returns
- Func<string, VelvetTask<NavigationResult>>
A stable delegate
navigate(to); the returned VelvetTask<T> can be awaited or fire-and-forget.