Skip to content

Commit d8335f3

Browse files
author
Cerem Cem ASLAN
committed
update documentation to reflect a better approach
1 parent a27b196 commit d8335f3

File tree

2 files changed

+13
-22
lines changed

2 files changed

+13
-22
lines changed

doc/Ractive/temporary-variables-inside-each-loop.ls

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Temporary Variable inside an `each` loop:
2+
3+
{{#each myobj}}
4+
{{#with (.foo !== 'bar') as tmp}}
5+
6+
<li>{{.hello}} tmp is: {{tmp}}</li>
7+
8+
{{/with}}
9+
{{/each}}
10+
11+
`myobj` is not polluted with the `tmp` variables.
12+
13+
(see https://gitter.im/ractivejs/ractive?at=5f3decae33878e7e602e58d7)

0 commit comments

Comments
 (0)