Skip to content

Instantly share code, notes, and snippets.

@qtuan
qtuan / app.html
Last active May 18, 2016 10:04
Aurelia lengthy operation in computed
<template>
<div>count: ${count}</div>
<div>nums:</div>
<ul>
<li repeat.for="num of nums">${num}</li>
</ul>
<button click.delegate="increase()">Increase count</button>
</template>
@qtuan
qtuan / app.html
Last active May 13, 2016 04:01
Aurelia "cancellable" custom binding behavior
<template>
<require from='./cancellable'></require>
<div>
Name: ${name}
Age: ${age}
<button click.delegate="edit()">Edit</button>
</div>
<div if.bind="editing">
@qtuan
qtuan / app.html
Last active September 26, 2016 13:45
Aurelia custom element inheritance
<template>
<require from="./thing"></require>
<require from="./child-thing"></require>
<require from="./other-thing"></require>
<thing></thing>
<child-thing></child-thing>
<other-thing></other-thing>
</template>
@qtuan
qtuan / app.html
Last active May 4, 2016 16:47
Aurelia global var subscription
<template>
See console
<button click.delegate="change()">Change</button>
</template>
@qtuan
qtuan / app.html
Last active May 4, 2016 10:43
Aurelia Hello World
<template>
Hello world!
</template>
@qtuan
qtuan / app.html
Created May 4, 2016 09:37
state.js
<template>
<require from="naive-if"></require>
<div naive-if="new,run">Hello world!</div>
<button click.delegate="cycleState()">Change state</button>
</template>