Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nuxt/nuxt/llms.txt
Use this file to discover all available pages before exploring further.
Type Signature
Parameters
Optional error to be thrown by
abortNavigation. Can be an Error object or a string message.Return Value
Returnsfalse to abort the navigation.
Examples
Basic Usage
The example below shows how you can useabortNavigation in a route middleware to prevent unauthorized route access:
Using String Error Message
You can pass the error as a string:Using Error Object
You can pass the error as an Error object, e.g. caught by thecatch-block: