Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / app.html
Last active May 12, 2016 10:56 — forked from lukechilds/app.html
Aurelia Inconsistent Template Behaviour
<template>
<require from="./attaching-span"></require>
<h1>${message}</h1>
<button click.delegate="addNumber('before')">Add number before</button>
<button click.delegate="addNumber('after')">Add number after</button>
<div>
<span as-element="attaching-span" repeat.for="number of numbers">${number}</span>
</div>
</template>
@niieani
niieani / app.html
Created May 11, 2016 18:42
Aurelia: More repeat enhancements
<template>
<require from="./component"></require>
<require from="./object-component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<button click.delegate="reverse()">Reverse</button>
<br>
<component
optimized-repeat.for="id of components"
text.bind="id">
@niieani
niieani / app.html
Last active April 24, 2016 01:48
Aurelia: Suboptimal repeat element lifecycle [swap-arrays + optimized-repeat + matcher]
<template>
<require from="./component"></require>
<require from="./object-component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<button click.delegate="reverse()">Reverse</button>
<br>
<component
optimized-repeat.for="id of components"
text.bind="id">
@niieani
niieani / app.html
Last active April 23, 2016 23:36
Aurelia: Suboptimal repeat element lifecycle [swap-arrays/reverse + optimized-repeat]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<button click.delegate="reverse()">Reverse</button>
<br>
<component
optimized-repeat.for="id of components"
text.bind="id">
[${$index}]
@niieani
niieani / app.html
Last active September 4, 2018 09:37
Aurelia: Suboptimal repeat element lifecycle [alternative without compose + optimized-repeat]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
optimized-repeat.for="id of components | without8: isFiltering.checked"
text.bind="id">
[${$index}]
</component>
@niieani
niieani / app.html
Last active July 14, 2016 00:29
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing + 9000 elements]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Last active April 19, 2016 17:21
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Last active April 19, 2016 16:47
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing + deepCompare]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="obj of componentsProxy"
id.bind="obj.id"
></component>
@niieani
niieani / app.html
Last active April 19, 2016 17:11
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays + diffing v2]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of componentsProxy"
id.bind="id"
></component>
@niieani
niieani / app.html
Created April 19, 2016 14:47
Aurelia: Suboptimal repeat element lifecycle [alternative without compose + diff + temp]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
repeat.for="id of components | without8: isFiltering.checked | diff: proxy"
id.bind="id"
></component>
</template>