Skip to content

Instantly share code, notes, and snippets.

@putstrln
putstrln / app.html
Last active April 8, 2018 10:48
Template binding for array
<template>
<h1>Referencing other fields in repeat.for of another field</h1>
<p>Even though randoms is updated, times repeat isn't re-rendered since randoms isn't watched in that loop.</p>
<p>To re-render the times loop, we need to use a signal to refresh the UI.</p>
<h2>Times</h2>
<ul>
<li repeat.for='time of times'>
# ${$index} Time - ${time} <-> Random - ${randoms[$index] & signal:'update-times'}
</li>
</ul>