mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
update some tests
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
<h1>{slug} {JSON.stringify(query)}</h1>
|
||||
<script context="module">
|
||||
export function preload({ params }) {
|
||||
return {
|
||||
slug: params.slug
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload({ params }) {
|
||||
return {
|
||||
slug: params.slug
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
export let slug;
|
||||
export let query;
|
||||
</script>
|
||||
|
||||
<h1>{slug} {JSON.stringify(query)}</h1>
|
||||
@@ -1,11 +1,13 @@
|
||||
<h1>{phrase}</h1>
|
||||
<script context="module">
|
||||
export function preload() {
|
||||
return this.fetch('fünke.json').then(r => r.json()).then(phrase => {
|
||||
return { phrase };
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload() {
|
||||
return this.fetch('fünke.json').then(r => r.json()).then(phrase => {
|
||||
return { phrase };
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
export let phrase;
|
||||
</script>
|
||||
|
||||
<h1>{phrase}</h1>
|
||||
Reference in New Issue
Block a user