From 84bd1e31e0f455c457681df5935e8839fa6ed7cf Mon Sep 17 00:00:00 2001 From: backyardcoder Date: Sat, 27 Apr 2019 23:24:45 -0700 Subject: [PATCH] Convey the last element deletion in the markup --- .../03-logic/04-keyed-each-blocks/Thing.svelte | 10 +++++++++- .../04-logic/05-keyed-each-blocks/app-a/Thing.svelte | 10 +++++++++- .../04-logic/05-keyed-each-blocks/app-b/Thing.svelte | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte index 4e86d32109..1023b997aa 100644 --- a/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte +++ b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte @@ -6,4 +6,12 @@ const valueAtStart = value; -

{valueAtStart} / {value}

\ No newline at end of file +{#if valueAtStart === value} +

+ {valueAtStart} / {value} +

+{:else} +

+ {valueAtStart} / {value} => bye bye last element...! +

+{/if} diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte index 4e86d32109..1023b997aa 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-a/Thing.svelte @@ -6,4 +6,12 @@ const valueAtStart = value; -

{valueAtStart} / {value}

\ No newline at end of file +{#if valueAtStart === value} +

+ {valueAtStart} / {value} +

+{:else} +

+ {valueAtStart} / {value} => bye bye last element...! +

+{/if} diff --git a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte index 4e86d32109..1023b997aa 100644 --- a/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte +++ b/site/content/tutorial/04-logic/05-keyed-each-blocks/app-b/Thing.svelte @@ -6,4 +6,12 @@ const valueAtStart = value; -

{valueAtStart} / {value}

\ No newline at end of file +{#if valueAtStart === value} +

+ {valueAtStart} / {value} +

+{:else} +

+ {valueAtStart} / {value} => bye bye last element...! +

+{/if}