v2.4.0
New
-
The
next
function in navigation guards can now accept an Error. This will be considered an explicit error, whereas callingnext(false)
is considered a "silent abort". -
New router instance method:
router.onError(errorCallback)
. The registered callback will be triggered under the following conditions:-
The error is thrown synchronously inside a route guard function;
-
The error is caught and asynchronously handled by calling
next(err)
inside a route guard function; -
An error occurred when trying to resolve an async component that is required to render a route.
-
-
router.onReady
now accepts an additional second argument, which is an error callback which will be called when the initial route resolution fails.