routes: [
{ path: '/', component },
{ path: '/users/:id', name: 'user', component },
+ { path: '/multiple/:a/:b', name: 'user', component },
// { path: /^\/about\/?$/, component },
],
})
console.log(`popstate(${type})`, { to, from })
})
+r.push('/multiple/one/two')
+
// h.push('/hey')
// h.push('/hey?lol')
// h.push('/foo')
// h.push('/replace-me')
// h.replace('/bar')
-r.push('/about')
-r.push({
- path: '/',
-})
+// r.push('/about')
+// r.push({
+// path: '/',
+// })
-r.push({
- name: 'user',
- params: {
- id: '6',
- },
-})
+// r.push({
+// name: 'user',
+// params: {
+// id: '6',
+// },
+// })
-r.push({
- name: 'user',
- params: {
- id: '5',
- },
-})
+// r.push({
+// name: 'user',
+// params: {
+// id: '5',
+// },
+// })
-r.push({
- params: {
- id: 'no-name',
- },
-})
+// r.push({
+// params: {
+// id: 'no-name',
+// },
+// })
// r.push({
// hash: '#hey',
constructor() {
super()
const to = buildFullPath()
- cs.log('created', to)
+ // cs.log('created', to)
this.history.replaceState(buildState(null, to, null), '', to)
this.location = to
this._popStateHandler = this.setupPopStateListener()