File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ To see the details code documentation, please read the [Code Documentation](http
5050 - [ go] ( #go )
5151 - [ routeURL] ( #routeurl )
5252 - [ navigationGuard] ( #navigationguard )
53+ - [ onBeforeNavigation] ( #onbeforenavigation )
5354 - [ onNavigationChanged] ( #onnavigationchanged )
5455 - [ onError] ( #onerror )
5556 - [ Location Object] ( #location-object )
@@ -623,6 +624,24 @@ Parameters:
623624
624625to, from are [Route Object](#route-object).
625626
627+ #### onBeforeNavigation
628+ Register a callback which will be called before execution of navigation guards.
629+ ` ` ` javascript
630+ const unregister = $router .onBeforeNavigation (callback);
631+
632+ // To unregister the event:
633+ unregister ();
634+ unregister = null ;
635+
636+ ` ` `
637+ Parameters:
638+
639+ | Name | Description | Type |
640+ | :----------- | :---------------------------------------- | :------------------------------------ |
641+ | callback | callback function with fn(to, from) signature. | function |
642+
643+ to, from are [Route Object](#route-object).
644+
626645#### onNavigationChanged
627646Register a callback which will be called when all navigation guards are resolved, and the final navigation change is resolved.
628647` ` ` javascript
You can’t perform that action at this time.
0 commit comments