From bc21fbe2e0241fa809c4b9c5447806e805d4b32b Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 6 May 2019 18:52:59 +0200 Subject: [PATCH] chore: add children routes for explorations --- explorations/html5.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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() -- 2.47.3