Files
sapper/test/apps/basics/src/routes/[...rest]/index.svelte
Brian Takita 5460896228 Checking the current_branch[i] route match against the current request's route match.
current_branch[i].match.slice(1, i+2) compared to match.slice(1, i+2)

Fixes https://github.com/sveltejs/sapper/issues/688
2019-05-20 23:03:08 -04:00

21 lines
428 B
Svelte

<script context="module">
export function preload({ query, params }) {
const { rest } = params;
return { rest };
}
</script>
<script>
import { stores } from '@sapper/app';
const { page } = stores();
export let rest;
</script>
<h1>{$page.params.rest.join(',')}</h1>
<h2>{rest.join(',')}</h2>
<a href="xyz/abc/deep">deep</a>
<a href="xyz/abc">deep</a>
<a href="xyz/abc/def">deep</a>
<a href="xyz/abc/def/ghi">deep</a>