mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
331 B
17 lines
331 B
4 years ago
|
<script>
|
||
|
import RawMustache from './RawMustache.svelte';
|
||
|
|
||
|
let content1 = `<p>First line</p>`;
|
||
|
let content2 = `<p>Another first line</p>`;
|
||
|
|
||
|
let show = false;
|
||
|
$: content = show ? content1 : content2;
|
||
|
</script>
|
||
|
|
||
|
<button on:click={() => show = !show}>
|
||
|
Switch
|
||
|
</button>
|
||
|
|
||
|
<RawMustache {content} />
|
||
|
|
||
|
<p>This line should be last.</p>
|