Skip to content

Instantly share code, notes, and snippets.

@geleto
geleto / app.html
Last active May 15, 2017 05:31
observable/bindable Propery Descriptors
<template>
<p>${message}</p>
</template>
@geleto
geleto / app.html
Created May 14, 2017 06:58 — forked from gheoan/app.html
Aurelia Gist
<template>
<p>${message}</p>
</template>
@geleto
geleto / app.html
Last active May 9, 2017 21:20
Compose view change
<template>
<button click.delegate="setControlView('control1.html')">1</button>
<button click.delegate="setControlView('control2.html')">2</button>
<br><br>
${showControl}
<input checked.two-way="showControl" type="checkbox">Show control
<compose if.bind="showControl" view="${controlView}">
</compose>
</template>
@geleto
geleto / app.html
Last active May 7, 2017 10:47
Aurelia Gist
<template>
<div mousemove.delegate="onDrag()" style="width:200px;height:200px;background:yellow;" draggable="true">
Drag me
</div>
</template>
@geleto
geleto / app.html
Last active May 1, 2017 09:01
Select array of classes
<template>
<input-select value.two-way="propertyType" choices.bind="propertyTypes" label="Type"></input-select>
<select value.two-way="propertyType">
<option repeat.for="property of propertyTypes" model.bind="propertyType">${property}</option>)
</select>
</template>
@geleto
geleto / app.html
Created May 1, 2017 08:52
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@geleto
geleto / app.html
Last active May 1, 2017 11:08
Aurelia Gist
<template>
<p>${message}</p>
</template>
@geleto
geleto / app.html
Last active October 27, 2016 13:54
Aurelia: collectionObserver
<template>
<div repeat.for="i of messages.length">
<input type="text" value.bind="$parent.messages[i]">
</div>
<button click.delegate="deleteFirst()">Delete First</button>
</template>
@geleto
geleto / app.html
Created October 27, 2016 13:22
Aurelia: Deleting array elements when changed to empty value - WORKING!
<template>
<div repeat.for="msg of messages">
<input type="text" value.bind="msg" input.delegate="onMessageChanged(msg, $index)">
</div>
</template>
@geleto
geleto / app.html
Last active October 27, 2016 13:24 — forked from martonsagi/app.html
Aurelia: Deleting array elements when changed to empty value - no 2-way binding
<template>
<div repeat.for="msg of messages">
<input type="text" value.bind="msg" input.delegate="onMessageChanged(msg, $index)">
</div>
</template>