From: Eduardo San Martin Morote Date: Tue, 16 Apr 2019 10:58:19 +0000 (+0200) Subject: comments X-Git-Tag: v4.0.0-alpha.0~449 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a75913cbf9cb174e5e0bd187e5009aa03cc117cd;p=thirdparty%2Fvuejs%2Frouter.git comments --- diff --git a/explorations/html5.ts b/explorations/html5.ts index 9af1d6f5..befece23 100644 --- a/explorations/html5.ts +++ b/explorations/html5.ts @@ -7,6 +7,7 @@ const r = new Router({ routes: [ { path: '/', component }, { path: '/users/:id', name: 'user', component }, + { path: '/multiple/:a/:b', name: 'user', component }, // { path: /^\/about\/?$/, component }, ], }) @@ -23,36 +24,38 @@ h.listen((to, from, { type }) => { 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', diff --git a/src/history/html5.ts b/src/history/html5.ts index f556e0c9..deabc096 100644 --- a/src/history/html5.ts +++ b/src/history/html5.ts @@ -43,7 +43,7 @@ export class HTML5History extends BaseHistory { 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()