useNavigationContext
Category:
Navigation & Routing
Composable to get navigation context from the URL.
Types
ts
export function useNavigationContext(
context?: Ref<Schemas["SeoUrl"] | null>,
): UseNavigationContextReturn
ts
export type UseNavigationContextReturn = {
/**
* SEO URL from the navigation context
*/
navigationContext: ComputedRef<Schemas["SeoUrl"] | null>;
/**
* Route name from the navigation context
*/
routeName: ComputedRef<Schemas["SeoUrl"]["routeName"] | undefined>;
/**
* Foreign key (ID) for current navigation context
*/
foreignKey: ComputedRef<string>;
};