]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: add note about relative redirect
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 23 Apr 2020 08:39:19 +0000 (10:39 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 23 Apr 2020 08:39:19 +0000 (10:39 +0200)
README.md

index 428632bc0adceecedaed958286ed3d463064dab6..dea7f493de9e9391b313cdf7ef51f5dd6cba85be 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,6 +21,22 @@ Since the library is still unstable **and because we want feedback** on bugs and
     .flat()
   ```
 - _resolving_(`router.resolve`) or _pushing_ (`router.push`) a location with missing params no longer warns and produces an invalid URL, but throws an Error instead
+- Relative children path `redirect` are not supported. Use named routes instead:
+  ```js
+  // replace
+  let routes = {
+    path: '/parent/',
+    children: [{ path: '', redirect: 'home' }, { path: 'home' }],
+  }
+  // with
+  let routes = {
+    path: '/parent/',
+    children: [
+      { path: '', redirect: { name: 'home' } },
+      { path: 'home', name: 'home' },
+    ],
+  }
+  ```
 
 #### Improvements