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

@@ -1 +0,0 @@
<h1>{params.slug.toUpperCase()}</h1>

View File

@@ -12,10 +12,10 @@
import { page } from '@sapper/app';
export let count;
export let child;
export let segment;
</script>
<span>y: {$page.params.y} {count}</span>
<svelte:component this={child.component} {...child.props}/>
<slot></slot>
<span>child segment: {child.segment}</span>
<span>child segment: {segment}</span>