Skip to content

Instantly share code, notes, and snippets.

View jsobell's full-sized avatar

Jason Sobell jsobell

View GitHub Profile
@jsobell
jsobell / app.html
Created August 1, 2018 22:46
Simple change detector example
<template>
<ul href="#!" repeat.for="user of users">
<li>
<input value.bind='user.firstName' /> <input value.bind='user.lastName' />
</li>
</ul>
</template>
@jsobell
jsobell / app.html
Created July 27, 2018 23:49 — forked from taosd/app.html
Aurelia Gist
<template>
<require from='thingy'></require>
<h1>${message}</h1>
<ul>
<li repeat.for="option of allOptions">
<input type="checkbox" checked.bind="selectedOptions" matcher.bind="matcher" model.bind="option">
${option.text}
</li>
</ul>
@jsobell
jsobell / app.html
Created January 17, 2018 02:34
Aurelia Gist
<template>
<h1>${message}</h1>
<input type='text' value.bind='myProperty' />
</template>
@jsobell
jsobell / app.html
Last active December 18, 2017 22:54 — forked from koakh/app.html
Aurelia Fetch Client Gist
<template>
<h1>${message}</h1>
<pre>data:[${data}]</pre>
<ul>
<!--
<li repeat.for="user of users">
${user.login}
</li>
-->
</ul>
@jsobell
jsobell / app.html
Created November 14, 2017 09:10
Aurelia Gist
<template>
<p>Hit edit and you'll see two items added to the form instead of one.</p>
<div if.bind="!editing">
<h2>${items.length} items!</h2>
<ul>
<li repeat.for="item of items">
${item.name}
</li>
</ul>
<button click.delegate="toggleEditing()">Edit</button>
@jsobell
jsobell / app.html
Last active October 20, 2017 05:37 — forked from oneillci/app.html
Aurelia view port
<template>
<h1>${message}</h1>
<button click.delegate="go()">go to second</button>
<div>
[[DEFAULT: <router-view name="primary"></router-view>]]
</div>
<div>
[[SECONDARY:<router-view name="secondary"></router-view>]]
</div>
</template>
@jsobell
jsobell / agregarCobranza.html
Created July 23, 2017 10:51
DI inheritance
<template>
<section>
<h2>${heading}</h2>
Caja
<select value.bind="cobranza.CajaId">
<option value="0">Seleccionar Caja</option>
<option repeat.for="caja of cajas" model.bind="caja.CajaId">${caja.Nombre}</option>
</select>
@jsobell
jsobell / app.html
Created May 16, 2017 00:42
Aurelia-Materialize bridge select basic use
<template>
<select md-select="label: select a value" value.two-way="selectedValue">
<option value="" disabled selected>select an item</option>
<option value="item1">item 1</option>
<option value="item2">item 2</option>
<option value="item3">item 3</option>
<option value="item4">item 4</option>
</select>
<div if.bind="selectedValue=='item1'">
You've selected "item 1"
@jsobell
jsobell / app.html
Last active July 12, 2018 15:49
Aurelia Validation Demo - Nested Property validation - Experiment
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<input type="text" class="form-control" id="last" placeholder="Last Name"
value.bind="person.firstName & validate">
</div>