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.
svelte/test/runtime/samples/raw-mustache-as-root/main.svelte

17 lines
331 B

<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>