Sha256: 6e1e122b07c4ba27f50f78474fa3fb398e933cc4f5357f908b2480188acd3653

Contents?: true

Size: 894 Bytes

Versions: 6

Compression:

Stored size: 894 Bytes

Contents

<!-- This file is made up from several examples on https://svelte.dev/examples and is not expected to function. -->
<script lang="ts">
    import Image from './Image.svelte';

    let src: string = '/tutorial/image.gif';
    let count: number = 1;
    $: doubled = count * 2;  // the `$:` is special in svelte
</script>

<Image {src} bind:alt="{name.capitalize()} dancing" user={name.toUpperCase(false, 42, {key: 'value'})}
       tooltip="I'm helping" false text=asdf on:message={handleMessage} />

{#await loadSrc(src)}
    loading...
{:then data}
    {#each cats as { name }, i}
        <li>{name}</li>
    {/each}

    <!-- Keyed Each Block -->
    {#each cats as cat (cat.id)}
        <li>{cat.name}</li>
    {/each}
{:catch err}
    {@debug err}
    {#await solveErr(err, {x: 'asdf'}) then reason}{@html reason}{/await}
{/await}

<style>p {font-family: 'Comic Sans MS', cursive;}</style>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rouge-4.5.1 lib/rouge/demos/svelte
rouge-4.5.0 lib/rouge/demos/svelte
rouge-4.4.0 lib/rouge/demos/svelte
rouge-4.3.0 lib/rouge/demos/svelte
rouge-4.2.1 lib/rouge/demos/svelte
rouge-4.2.0 lib/rouge/demos/svelte