From: Eduardo San Martin Morote Date: Mon, 6 May 2019 16:52:59 +0000 (+0200) Subject: chore: add children routes for explorations X-Git-Tag: v4.0.0-alpha.0~382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc21fbe2e0241fa809c4b9c5447806e805d4b32b;p=thirdparty%2Fvuejs%2Frouter.git chore: add children routes for explorations --- diff --git a/explorations/html5.ts b/explorations/html5.ts index c4080080..34f25759 100644 --- a/explorations/html5.ts +++ b/explorations/html5.ts @@ -31,6 +31,15 @@ const r = new Router({ }, }, { path: '/cant-leave', component: GuardedWithLeave }, + { + path: '/children', + component, + children: [ + { path: '', name: 'default-child', component }, + { path: 'a', name: 'a-child', component }, + { path: 'b', name: 'b-child', component }, + ], + }, // { path: /^\/about\/?$/, component }, ], }) @@ -106,6 +115,11 @@ async function run() { await r.push({ hash: '#hey', }) + + await r.push('/children') + await r.push('/children/a') + await r.push('/children/b') + await r.push({ name: 'a-child' }) } run()