Skip to content

Function: useRouteHash() ​

ts
function useRouteHash<P, M>(options?): Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>;

Defined in: router/use-route-hash.ts:87

Keeps the fragment of the URL and returns a ref over it, with the leading # as part of the value. Needs vue-router.

Type Parameters ​

Type ParameterDefault type
P extends ParserInput | undefinedundefined
Mnull

Parameters ​

ParameterType
options?UseRouteHashOptions<P, M>

Returns ​

Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>

Released under the MIT License.