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 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
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
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 / 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
Created October 10, 2016 22:43 — forked from jawa-the-hutt/app.html
Aurelia Validation Demo - updateTrigger issue?
<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="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Name"
value.bind="user.name & validate">
</div>
@jsobell
jsobell / address.js
Last active September 16, 2016 12:24 — forked from dtaalbers/address.js
Aurelia Validation - Why is ensureObject not being called?
import { ValidationRules } from 'aurelia-validation';
export class Address {
street;
city;
}
/*ValidationRules
.ensure(a => a.street).required()
.ensure(a => a.city).required()
@jsobell
jsobell / app.html
Last active September 3, 2016 11:15 — forked from y2k4life/app.html
Display Validation success, and allow reset...
<template>
<div>
<a href="http://aurelia.io/hub.html#/doc/article/aurelia/validation/latest/validation-basics/9" target="top">Documentation</a>
</div>
<form submit.delegate="submit()" novalidate autocomplete="off">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="A">String A</label>
<input type="text" class="form-control" id="A" value.bind="A & validate">
@jsobell
jsobell / app.html
Last active September 7, 2016 13:43 — forked from jdanyow/app.html
Aurelia confirm password validation demo
zXDcv<template>
<form submit.delegate="submit()" novalidate autocomplete="off">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="password">Password</label>
<input type="password" class="form-control" id="password" placeholder="Password"
value.bind="password & validate"
>
</div>
@jsobell
jsobell / app.html
Last active August 31, 2016 07:37 — forked from kevmeister68/app.html
Aurelia processContent( ) problem -- view.bind( ) does not bind to custom element correctly.
<template>
<require from="hc-ui-tabcontrol"></require>
<button click.trigger='tc.handleClickEvent("TEST")'>TEST</button>
<button click.trigger='showTC()'>showTC</button>
<ui-tabcontrol controller.ref='tc'>
<tab-page>
<tab-heading>Heading1</tab-heading>