Skip to content

Instantly share code, notes, and snippets.

@djedi
djedi / app.html
Last active March 9, 2018 21:51
collection observer vs observable, splice, replace combo solution - binding input in another repeater
<template>
<button click.delegate="addData()">Add Data</button>
<button click.delegate="popData()">Pop Data</button>
<button click.delegate="spliceData()">Splice Data</button>
<button click.delegate="replaceData()">Replace Data</button>
<hr>
Data:
<table>
<tr repeat.for="val of data">
@djedi
djedi / app.html
Last active March 2, 2018 13:44 — forked from deap82/app.html
collection observer vs observable, splice, replace combo solution - binding input in another repeater
<template>
<button click.delegate="addData()">Add Data</button>
<button click.delegate="popData()">Pop Data</button>
<button click.delegate="spliceData()">Splice Data</button>
<button click.delegate="replaceData()">Replace Data</button>
<hr>
Data:
<table>
<tr repeat.for="i of data.length">
@djedi
djedi / app.html
Last active February 21, 2018 16:18
code sample component
<template>
<require from="./my-code-sample"></require>
<require from="./my-button.html"></require>
<my-code-sample>
<br><hr><hr>
</my-code-sample>
<my-code-sample>
<table border="1">
@djedi
djedi / app.html
Last active February 2, 2018 17:53
shared class
<template>
<require from="./componentA"></require>
<require from="./componentB"></require>
<component-a>
<component-b>Click Here</component-b>
</component-a>
</template>
@djedi
djedi / app.html
Last active January 5, 2018 17:09
get attribute from parent
<template>
<require from="./my-radio-holder"></require>
<require from="./my-radio"></require>
<my-radio-holder name="myname" id="force"> <!-- id is optional -->
<my-radio>Option 1</my-radio>
<my-radio>Option 2</my-radio>
</my-radio-holder>
</template>
@djedi
djedi / app.html
Last active January 5, 2018 16:45
get attribute from parent
<template>
<require from="./my-radio-holder"></require>
<require from="./my-radio"></require>
<my-radio-holder name="myname" id="force"> <!-- id is optional -->
<my-radio>Option 1</my-radio>
<my-radio>Option 2</my-radio>
</my-radio-holder>
</template>
@djedi
djedi / app.html
Last active January 5, 2018 15:28
get attribute from parent
<template>
<require from="./my-radio-holder"></require>
<require from="./my-radio"></require>
<my-radio-holder name="myname" id="force"> <!-- id is optional -->
<my-radio>Option 1</my-radio>
<my-radio>Option 2</my-radio>
</my-radio-holder>
</template>
@djedi
djedi / app.html
Last active December 21, 2020 00:49
inject element
<template>
<require from="./mycode"></require>
<mycode>
testing...
</mycode>
<mycode>
<table>
<tr>
@djedi
djedi / app.html
Last active December 21, 2020 00:49
Basic Aurelia Gist Starter
<template>
<require from="./toggle-code"></require>
<toggle-code>
<br><hr><hr>
</toggle-code>
<toggle-code>
<table>
<thead>
@djedi
djedi / app.html
Last active November 16, 2017 20:40
Basic Aurelia Gist Starter
<template>
<require from="./toggle-code"></require>
<toggle-code>
<br><hr>
</toggle-code>
<toggle-code>
<table>
<thead>