Skip to content

Instantly share code, notes, and snippets.

View davismj's full-sized avatar
🎓
Computing normal vectors.

Matthew James Davis davismj

🎓
Computing normal vectors.
View GitHub Profile
@davismj
davismj / app.html
Created March 31, 2021 14:16 — forked from jdanyow/app.html
Aurelia Validation Demo
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>
@davismj
davismj / app.html
Last active July 21, 2020 17:25 — forked from fkleuver/app.html
Modify a template and rerender
<template>
<require from="custom-table"></require>
<custom-table items.bind="data">
<template replace-part="row">
<tr>
<th>${item.v}</th>
<th>${item.a}</th>
<th>${item.k}</th>
</tr>
</template>
@davismj
davismj / app.html
Last active March 29, 2019 14:34 — forked from Thanood/app.html
Aurelia-Materialize bridge base
<template>
<div>
<md-pagination md-pages="6" md-active-page.bind="activePage"></md-pagination>
</div>
<div>
active page: ${activePage}
</div>
<button md-button md-waves="color: light;" click.delegate="setToFive()">set to 5</button>
</template>
@davismj
davismj / app.html
Last active May 12, 2018 06:50 — forked from jfstephe/app.html
Aurelia Router Demo
<template>
<require from="components/navigation.html"></require>
<h1>Aurelia Router Demo</h1>
<navigation router.bind="router" class="primary-navigation"></navigation>
<div class="page-host">
<router-view></router-view>
</div>
<a href="#/profile/account/username?username=james">james</a>
<a href="#/profile/account/username?username=john">john</a>
</template>
@davismj
davismj / app.html
Created February 9, 2018 09:46 — forked from swalters/app.html
Aurelia Dependency Injection Inheritance
<template>
<require from="./elem1"></require>
<require from="./elem2"></require>
<elem1 view-model.ref="elem1">
<h3>inside Elem1</h3>
<!-- don't process elem2 until Elem1 attached -->
<div if.bind="elem1.ready">
<elem2>
</elem2>
@davismj
davismj / app.html
Created January 15, 2018 08:04 — forked from deap82/app.html
Aurelia Gist - router:navigation:complete issue (fixed)
<template>
<ul id="menu">
<li><a href="#/Welcome">Welcome</a></li>
<li><a href="#/Products">Products</a></li>
<li><a href="#/Contact">Contact</a></li>
</ul>
<div id="content">
<router-view></router-view>
</div>
@davismj
davismj / app.html
Last active November 29, 2017 04:18 — forked from bigopon/app.html
Respond to changed values demo
<template>
<input type="number" value.bind="value" change.delegate="updateValue(value)" />
</template>
@davismj
davismj / app.html
Last active November 29, 2017 22:36 — forked from dfoderberg/app.html
bug
<template>
<h1>Davis' Height</h1>
<p>
For the inches input, we do the following:<br />
<ol>
<li>First, we remove the inches value converter. The canonical value is inches, so we don't need to convert
the value.</li>
<li>Next, we add a number value converter. Seems trivial, but this ensures that our value always comes back
from the view as a number. We could add this to the decimals value converter, except it might not be clear
how that would behave. Would it return a number of max precision, or of precision n?</li>
@davismj
davismj / app.html
Last active March 13, 2018 20:55 — forked from AustinBrunkhorst/app.html
Aurelia Menu Sample
<template>
<div>
<button repeat.for="route of router.navigation" click.delegate="router.navigateToRoute(route.config.name)">${route.title} ${route.isActive}</button>
</div>
<h1>Aurelia Menu with Child Routes example</h1>
<div>
<router-view></router-view>
</div>
</template>
@davismj
davismj / app.html
Last active November 14, 2017 17:35 — forked from bigopon/app.html
Aurelia function computedFrom
<template>
<style>
label {display: block; padding: 4px 0;}
</style>
<hr/>
<label>
First Name: <input value.bind='firstName' />
</label>
<label>