Answers for "svelte 3 if else"

6

svelte if else

{#if loaded}
    <h1>Hello World!</h1>
  {:else}
    <h1>Loading...</h1>
{/if}


example 2:
{#if status == 200}
    <h1>Hello World!</h1>
  {:else if status == 401}
    <h1>Not Authorized</h1>
  {:else}
    <h1>Don't know what happened in there</h1>
{/if}
Posted by: Guest on July-26-2021

Browse Popular Code Answers by Language