From a5c1b6181f0d736729236c8582d7d7c6cc11c148 Mon Sep 17 00:00:00 2001
From: David Horak history.js
diff --git a/docs/index.html b/docs/index.html
index a29db9b..b12f6a4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -534,12 +534,12 @@ Create a Navigation Guard
Route Object.
"from, to" are Route Object.
next();
Move on to the next hook in the pipeline. If no hooks are left, the navigation is confirmed.
next(false);
Abort the current navigation.
// URL
@@ -746,12 +746,12 @@ navigationGuard
Register a navigation guard which will be called when
guard
-guard callback function with (to, from, next) signature. Please see Navigation Guard Next Action
+guard callback function with (from, to, next) signature. Please see Navigation Guard Next Action
function
-to, from are Route Object.
+"from, to" are Route Object.
onBeforeNavigation
Register a callback which will be called before execution of navigation guards.
const unregister = $router.onBeforeNavigation(callback);
@@ -775,7 +775,7 @@ onBeforeNavigation
Register a callback which will be called before ex
-
to, from are Route Object.
+"from, to" are Route Object.
onNavigationChanged
Register a callback which will be called when all navigation guards are resolved, and the final navigation change is resolved.
const unregister = $router.onNavigationChanged(callback);
@@ -799,7 +799,7 @@ onNavigationChanged
Register a callback which will be called when all
-
to, from are Route Object.
+"from, to" are Route Object.
onError
Register a callback which will be called when an error is caught during a route navigation.
const unregister = $router.onError(callback);
@@ -994,7 +994,7 @@ License
guard callback function
-with (to, from, next) signature.
+with (from, to, next) signature.
@@ -2387,7 +2387,7 @@ start
diff --git a/docs/module-svelte-router.html b/docs/module-svelte-router.html
index 360cabf..c21d113 100644
--- a/docs/module-svelte-router.html
+++ b/docs/module-svelte-router.html
@@ -582,7 +582,7 @@ Type:
diff --git a/docs/module-svelte-router_history.html b/docs/module-svelte-router_history.html
index ed794a4..5689741 100644
--- a/docs/module-svelte-router_history.html
+++ b/docs/module-svelte-router_history.html
@@ -853,7 +853,7 @@ Returns:
diff --git a/docs/module-svelte-router_location.html b/docs/module-svelte-router_location.html
index 0dc3156..91f0090 100644
--- a/docs/module-svelte-router_location.html
+++ b/docs/module-svelte-router_location.html
@@ -798,7 +798,7 @@ Properties:
diff --git a/docs/module-svelte-router_route.html b/docs/module-svelte-router_route.html
index 1e3d2d6..a64a5dc 100644
--- a/docs/module-svelte-router_route.html
+++ b/docs/module-svelte-router_route.html
@@ -1790,7 +1790,7 @@ Properties:
diff --git a/docs/module-svelte-router_utils.html b/docs/module-svelte-router_utils.html
index 8b5a3d5..3ba0807 100644
--- a/docs/module-svelte-router_utils.html
+++ b/docs/module-svelte-router_utils.html
@@ -2244,7 +2244,7 @@ Properties:
diff --git a/docs/route.js.html b/docs/route.js.html
index 51a359b..6ece224 100644
--- a/docs/route.js.html
+++ b/docs/route.js.html
@@ -254,7 +254,7 @@ route.js
diff --git a/docs/router.js.html b/docs/router.js.html
index 51089af..30e528b 100644
--- a/docs/router.js.html
+++ b/docs/router.js.html
@@ -165,7 +165,7 @@ router.js
* Navigation guard must call the next() function to continue
* the execution of navigation change.
* @param {function} guard guard callback function
- * with (to, from, next) signature.
+ * with (from, to, next) signature.
* @return {function} remove guard function.
*/
navigationGuard(guard) {
@@ -811,7 +811,7 @@ router.js
diff --git a/docs/utils.js.html b/docs/utils.js.html
index 13638bd..3a2cc6d 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -310,7 +310,7 @@ utils.js
diff --git a/readme.md b/readme.md
index db9b089..07b2b46 100644
--- a/readme.md
+++ b/readme.md
@@ -472,13 +472,13 @@ import {router} from '@spaceavocado/svelte-router';
// The guard callback is called when a navigation occurs,
// the next function must be called to continue the navigation.
-$router.navigationGuard((to, from, next) => {
+$router.navigationGuard((from, to, next) => {
next();
});
```
> Note: the **router** can be accessed after the **createRouter** function is executed, and it must be accessed as **$router** since it is Svelte read-able store object.
-to, from are [Route Object](#route-object).
+"from, to" are [Route Object](#route-object).
#### Navigation Guard Next Action
##### Continue
@@ -653,9 +653,9 @@ Parameters:
| Name | Description | Type |
| :----------- | :---------------------------------------- | :------------------------------------ |
-| guard | guard callback function with (to, from, next) signature. Please see [Navigation Guard Next Action](#navigation-guard-next-action) | function |
+| guard | guard callback function with (from, to, next) signature. Please see [Navigation Guard Next Action](#navigation-guard-next-action) | function |
-to, from are [Route Object](#route-object).
+"from, to" are [Route Object](#route-object).
#### onBeforeNavigation
Register a callback which will be called before execution of navigation guards.
@@ -673,7 +673,7 @@ Parameters:
| :----------- | :---------------------------------------- | :------------------------------------ |
| callback | callback function with fn(from, to) signature. | function |
-to, from are [Route Object](#route-object).
+"from, to" are [Route Object](#route-object).
#### onNavigationChanged
Register a callback which will be called when all navigation guards are resolved, and the final navigation change is resolved.
@@ -691,7 +691,7 @@ Parameters:
| :----------- | :---------------------------------------- | :------------------------------------ |
| callback | callback function with fn(from, to) signature. | function |
-to, from are [Route Object](#route-object).
+"from, to" are [Route Object](#route-object).
#### onError
Register a callback which will be called when an error is caught during a route navigation.
diff --git a/src/router.js b/src/router.js
index 980c868..f3e6047 100644
--- a/src/router.js
+++ b/src/router.js
@@ -121,7 +121,7 @@ class Router {
* Navigation guard must call the next() function to continue
* the execution of navigation change.
* @param {function} guard guard callback function
- * with (to, from, next) signature.
+ * with (from, to, next) signature.
* @return {function} remove guard function.
*/
navigationGuard(guard) {