We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d8fc55 commit fa8a7b0Copy full SHA for fa8a7b0
doc/Ractive/temporary-variables-inside-each-loop.ls
@@ -0,0 +1,22 @@
1
+'''
2
+Temporary Variable inside an `each` loop:
3
+
4
+ {{#each myobj}}
5
+ {{ @context.set('._tmp1', (.foo !== 'bar')) && '' }}
6
+ ...
7
+ {{/each}}
8
9
+or by using `<tmp />` component:
10
11
12
+ <tmp key="._tmp1" value="{{.foo !== 'bar'}}" />
13
14
15
16
17
+Ractive.components['tmp'] = Ractive.extend do
18
+ template: ''
19
+ isolated: no
20
+ on:
21
+ init: (ctx) ->
22
+ ctx.set @get('key'), @get('value')
0 commit comments