Skip to content

Instantly share code, notes, and snippets.

View jdanyow's full-sized avatar
💭
Confirming my whereabouts

Jeremy Danyow jdanyow

💭
Confirming my whereabouts
View GitHub Profile
<template>
<input type="text" list="myDatalist" input.delegate="selectedValue = findOption($event.target.value)" />
<datalist id="myDatalist">
<option repeat.for="option of options">${option.name}</option>
</datalist>
<pre style="margin-top: 100px"><code>${selectedValue}</code></pre>
</template>
<template>
<form submit.delegate="submit()">
<div class="form-group">
<label class="control-label" for="email">Email</label>
<input type="text" class="form-control" id="email" placeholder="Email"
value.bind="model[field] & validate:rules">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<template>
<div if.bind="isLoading">
<h1>Loading ...</h1>
</div>
<div if.bind="!isLoading">
<h1>Done!</h1>
<p ref="messageRef">${message}</p>
<p>${messageRef}</p>
</div>
</template>
@jdanyow
jdanyow / app.html
Created October 3, 2016 11:17 — forked from geleto/app.html
Select bound to a sub-property does not update properly when changing the parent property
<template>
<label>Car</label>
<select value.bind="selectedCar">
<option repeat.for="car of cars" model.bind="car">${car.name}</option>)
</select>
<br>
Selected car: <b>${selectedCar.name}</b>
<br>
<button click.delegate="selectCar(0)">Select Audi</button>
@jdanyow
jdanyow / app.html
Created September 29, 2016 21:23
Aurelia Gist
<template>
<h1>${value}</h1>
</template>
<template>
<button type="button" click.delegate="onChange($event, 'm1')">M1</button>
<button type="button" click.delegate="onChange($event, 'm2')">M2</button>
<button type="button" click.delegate="logModel($event)">Log</button>
<compose view.bind="myView" model.bind="$this"></compose>
</template>
@jdanyow
jdanyow / app.html
Created September 27, 2016 20:33 — forked from 3cp/app.html
aurelia svg if binding
<template>
<button click.delegate="toggleLine()">toggleLine</button><br/>
<svg width="100" height="100">
<line
if.bind="line"
x1.bind="line.sx"
y1.bind="line.sy"
x2.bind="line.ex"
y2.bind="line.ey" stroke="black"></line>
</svg>
@jdanyow
jdanyow / app.html
Created September 23, 2016 04:05 — forked from 3cp/app.html
aurelia-test
<template>
<require from="./child"></require>
<button click.delegate="newItems()">new items</button>
<child repeat.for="item of items" id.bind="item.id" value.bind="item.value"></child>
</template>
<template>
<form submit.delegate="submit()">
<h1>${title}</h1>
<div class="form-group">
<label class="control-label" for="last">Name</label>
<input type="text" class="form-control" placeholder="Name"
value.bind="driver.name & validate">
</div>
<div class="form-group">
@jdanyow
jdanyow / app.html
Last active October 12, 2016 08:56 — forked from funky-jojo/app.html
Aurelia Validation Demo - SubElement
<template>
<router-view></router-view>
</template>