Skip to content

Instantly share code, notes, and snippets.

View ZoolWay's full-sized avatar

Ricky Blankenaufulland ZoolWay

View GitHub Profile
@ZoolWay
ZoolWay / app.html
Last active April 19, 2017 12:45
Aurelia Debounce
<template>
<h1>Aurelia Debounce</h1>
<div ref="areaContainer">
<h2>Textbox:</h2>
<div style="border:1px solid blue; padding: 1em; margin: 1em;">
<input value.bind="myText & debounce:800" placeholder="type here" />
</div>
@ZoolWay
ZoolWay / app.html
Last active April 12, 2017 17:17
Aurelia Resize
<template>
<require from="my-comp"></require>
<h1>Aurelia Reisze</h1>
<div ref="areaContainer">
<h2>Component:</h2>
<my-comp title="simple"></my-comp>
@ZoolWay
ZoolWay / app.html
Last active April 11, 2017 08:22
ViewModels with parents / children
<template>
<require from="my-comp"></require>
<h1>Parents, children and viewmodels</h1>
<h2>Tree:</h2>
<ul>
<li repeat.for="n of nodes">
<compose view-model="my-comp" model.bind="n"></compose>
<ul>
@ZoolWay
ZoolWay / app.html
Last active April 5, 2017 13:39
Attach/Detach by array
<template>
<require from="my-comp"></require>
<h1>Attach/Detach when comp is added/removed by array</h1>
<h2>Instances:</h2>
<div>
<div repeat.for="c of comps">
<my-comp value.bind="c"></my-comp>
</div>
@ZoolWay
ZoolWay / app.html
Last active March 24, 2017 11:01
add/remove
<template>
<require from="my-comp"></require>
<h1>Custom Component with boolean attribute binding</h1>
<h2>Using a string attribute:</h2>
<div>
<my-comp value="true"></my-comp>
<my-comp value="false"></my-comp>
</div>
@ZoolWay
ZoolWay / app.html
Last active February 10, 2017 16:25
button disabled
<template>
<require from="my-button"></require>
<h1>${message}</h1>
<div>
<my-button>Button 1</my-button>
<my-button is-enabled="false">Button 2</my-button>
<my-button is-enabled.bind="isButton3Enabled">Button 3</my-button>
<my-button is-enabled.bind="isButton4Enabled">Button 4</my-button>
@ZoolWay
ZoolWay / comp3.html
Last active January 27, 2017 12:02
External Component for Aurelia Plugin Loader III
<template>
<p style="border: 1px solid purple; padding: 1rem;">Comp3: ${myVar}</p>
</template>
@ZoolWay
ZoolWay / app.html
Last active January 27, 2017 12:02
Aurelia Plugin Loader III
<template>
<require from="./component"></require>
<require from="./comp2"></require>
<require from="./comp3!gate"></require>
<require from="./ext-styles.css!gate" as="scoped"></require>
<h2>Plugin Loader</h2>
<hr />
<div>
<h3>Component direct</h3>
<component></component>
@ZoolWay
ZoolWay / app.html
Last active January 24, 2017 10:07
Aurelia Plugin Loader II
<template>
<require from="./component"></require>
<require from="./comp2!gate"></require><!-- Issue 1 -->
<h2>Plugin Loader</h2>
<hr />
<div>
<h3>Component direct</h3>
<component></component>
</div>
<hr />
@ZoolWay
ZoolWay / app.html
Last active February 11, 2024 22:35
Aurelia Plugin Loader
<template>
<require from="./component"></require>
<require from="./comp2!gate"></require><!-- Issue 1 -->
<require from="./styles.css!gate"></require>
<h2>Plugin Loader</h2>
<hr />
<div>
<h3>Component direct</h3>
<component></component>
</div>