This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |