Skip to content

Instantly share code, notes, and snippets.

View RichTeaTime's full-sized avatar

Rich RichTeaTime

View GitHub Profile
@RichTeaTime
RichTeaTime / index.html
Last active October 22, 2019 12:29
Chrome SVG re-layout issue
<html>
<script language="JavaScript"><!--
function onLoad() {
var canvas = document.getElementById('canvas');
var red = document.getElementById('red');
setTimeout( function() {
red.setAttribute('stroke-width', '5px');
@RichTeaTime
RichTeaTime / app.html
Last active October 31, 2018 15:08 — forked from Krussicus/app.html
Aurelia Gist
<template>
<nav class="navbar">
<a repeat.for="nav of router.navigation" href.bind="nav.href" class="nav-link ${nav.isActive ? 'active' : ''}">
${nav.title}
</a>
</nav>
<router-view></router-view>
</template>
@RichTeaTime
RichTeaTime / app.html
Created October 31, 2018 14:52 — forked from Krussicus/app.html
Aurelia Gist
<template>
<nav class="navbar">
<a repeat.for="nav of router.navigation" href.bind="nav.href" class="nav-link ${nav.isActive ? 'active' : ''}">
${nav.title}
</a>
</nav>
<router-view></router-view>
</template>
@RichTeaTime
RichTeaTime / app.html
Last active April 19, 2018 16:03
Aurelia Test - propertyChange
<template>
<require from="./component"></require>
<h3>Not calling the propertyChanged handler</h3>
<component propone="Hugh" update-on-bind.bind="false"></component>
<h3>Calling the propertyChanged handler manually</h3>
<component propone="Juan" update-on-bind.bind="true"></component>
</template>
@RichTeaTime
RichTeaTime / app.html
Created March 3, 2017 13:08
Aurelia Test - if.bind and ref
<template>
ROOT
<div if.bind="showApp" ref="theelement">
This is the element.
</div>
</template>
@RichTeaTime
RichTeaTime / app.html
Created February 13, 2017 16:23 — forked from joelclimbsthings/app.html
Aurelia Test
<template>
<div class="page-host">
<div repeat.for="obj of data">${obj.id} = ${obj.val}</div>
</div>
<div click.delegate="update()">UPDATE</div>
</template>
@RichTeaTime
RichTeaTime / app.html
Created February 13, 2017 16:23 — forked from joelclimbsthings/app.html
Aurelia Test
<template>
<div class="page-host">
<div repeat.for="obj of data">${obj.id} = ${obj.val}</div>
</div>
<div click.delegate="update()">UPDATE</div>
</template>
@RichTeaTime
RichTeaTime / app.html
Last active October 20, 2016 12:06
Aurelia Gist - using @Inject(NewInstance) does not work correctly with container.registerInstance
<template>
<require from="component"></require>
<div>expected: <span innerHTML.bind="mocktext"></span></div>
<div>actual: <component></component></div>
</template>
@RichTeaTime
RichTeaTime / app.html
Last active October 20, 2016 12:06
Aurelia Gist - using @Inject works correctly with container.registerInstance
<template>
<require from="component"></require>
<div>expected: <span innerHTML.bind="mocktext"></span></div>
<div>actual: <component></component></div>
</template>
@RichTeaTime
RichTeaTime / app.html
Created October 20, 2016 11:45 — forked from plwalters/app.html
Aurelia If Bind test on <content>
<template>
<require from="./parent"></require>
<parent></parent>
</template>