Slot-based routing (#573)

This commit is contained in:
Rich Harris
2019-02-21 16:34:07 -05:00
committed by GitHub
parent c637687922
commit e0de230e13
22 changed files with 141 additions and 99 deletions

View File

@@ -0,0 +1,21 @@
<script context="module">
import counts from '../_counts.js';
export function preload() {
return {
count: counts.y += 1
};
}
</script>
<script>
import { page } from '@sapper/app';
export let count;
export let segment;
</script>
<span>y: {$page.params.y} {count}</span>
<slot></slot>
<span>child segment: {segment}</span>