v2.4.0
New
-
The
nextfunction 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.onReadynow accepts an additional second argument, which is an error callback which will be called when the initial route resolution fails.