mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 19:45:26 +00:00
spread routes
This commit is contained in:
3
test/apps/basics/src/routes/[...rest]/deep.json.js
Normal file
3
test/apps/basics/src/routes/[...rest]/deep.json.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export function get(req, res) {
|
||||
res.end(req.params.rest.join(','));
|
||||
}
|
||||
7
test/apps/basics/src/routes/[...rest]/deep.svelte
Normal file
7
test/apps/basics/src/routes/[...rest]/deep.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import { page } from '@sapper/app';
|
||||
</script>
|
||||
|
||||
<h1>{$page.params.rest.join(',')}</h1>
|
||||
|
||||
<a href="xyz/abc/qwe/deep.json">deep</a>
|
||||
7
test/apps/basics/src/routes/[...rest]/index.svelte
Normal file
7
test/apps/basics/src/routes/[...rest]/index.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import { page } from '@sapper/app';
|
||||
</script>
|
||||
|
||||
<h1>{$page.params.rest.join(',')}</h1>
|
||||
|
||||
<a href="xyz/abc/deep">deep</a>
|
||||
Reference in New Issue
Block a user