Skip to content

Instantly share code, notes, and snippets.

View gronostajo's full-sized avatar

Krzysztof Śmiałek gronostajo

View GitHub Profile
@gronostajo
gronostajo / app.html
Last active September 7, 2017 13:09 — forked from jdanyow/app.html
Array modifications don't trigger bindings
<template>
<require from="./toggle"></require>
<input type="checkbox" model.one-time="model" checked.bind="items">
<toggle model.one-time="model" array.bind="items"></toggle>
<button click.delegate="reassign()">Reassign array</button>
<h3>Manual:</h3>
<p>Checkbox and <code>&lt;toggle&gt;</code> custom element are both bound to the same array and are expected to do the same thing.</p>
<p>Clicking <i>Toggle</i> will modify <code>items</code> array and toggle internal flag. The checkbox will react to array's change. Getter won't be triggered.</p>