@kitbag/router 0.0.1 → 0.0.2
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 +17 -0
- package/dist/kitbag-router.d.ts +547 -3699
- package/dist/kitbag-router.js +1188 -4725
- package/dist/kitbag-router.umd.cjs +1 -4951
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,6 +108,23 @@ router.push('https://github.com/kitbagjs/router')
|
|
|
108
108
|
|
|
109
109
|
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
110
|
|
|
111
|
+
## Update
|
|
112
|
+
|
|
113
|
+
If you only wish to change the params on the current route you can use `router.route.update`.
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
router.route.update('myParam': 123)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
or for setting multiple params at once
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
router.route.update({
|
|
123
|
+
myParam: 123,
|
|
124
|
+
tab: 'github',
|
|
125
|
+
})
|
|
126
|
+
```
|
|
127
|
+
|
|
111
128
|
## RouterView
|
|
112
129
|
|
|
113
130
|
Give your route components a place to be mounted
|