@kitbag/router 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/dist/kitbag-router.d.ts +560 -3703
- package/dist/kitbag-router.js +1216 -4728
- package/dist/kitbag-router.umd.cjs +1 -4951
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
A simple and versatile mapping utility for Typescript.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.org/package/kitbag/router)
|
|
6
|
-
[](https://app.netlify.com/sites/kitbag-router/deploys)
|
|
6
|
+
[](https://app.netlify.com/sites/kitbag-router/deploys)
|
|
8
7
|
|
|
9
8
|
Get started with the [documentation](https://kitbag-router.netlify.app/)
|
|
10
9
|
|
|
@@ -108,6 +107,23 @@ router.push('https://github.com/kitbagjs/router')
|
|
|
108
107
|
|
|
109
108
|
This `source` argument is type safe, expecting either a Url or a valid route "key". Url is any string that starts with "http", "https", or a forward slash "/". Route key is a string of route names joined by a period `.` that lead to a non-disabled route. Additionally if using the route key, push will require params be passed in if there are any.
|
|
110
109
|
|
|
110
|
+
## Update
|
|
111
|
+
|
|
112
|
+
If you only wish to change the params on the current route you can use `router.route.update`.
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
router.route.update('myParam': 123)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
or for setting multiple params at once
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
router.route.update({
|
|
122
|
+
myParam: 123,
|
|
123
|
+
tab: 'github',
|
|
124
|
+
})
|
|
125
|
+
```
|
|
126
|
+
|
|
111
127
|
## RouterView
|
|
112
128
|
|
|
113
129
|
Give your route components a place to be mounted
|