I have template that looks like this:
calling it:
{{Gd-text-input label="Specify" name="Specify" key="entry.810220554" hideIf=true}}
The template:
<script type="text/x-handlebars" data-template-name='components/Gd-radio-input'>
{{log key}}
{{#each content}}
{{log key}}
<div class="radiobutton">
{{radio-button id=label value=label name=key }}
<label {{bind-attr for="label"}}>{{label}}</label>
</div>
{{/each}}
</script>
The first log key outputs asdf. The one inside the #each – loop is undefined. How can I tell the Each-loop about the variable or access it from outside the loop?
view.key is what is needed, so
{{log view.key}}
will output the variable-name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With