Skip to content

Instantly share code, notes, and snippets.

View bigopon's full-sized avatar
💭
Working

bigopon bigopon

💭
Working
View GitHub Profile
@bigopon
bigopon / app.html
Created December 10, 2016 09:18 — forked from weoreference/index.html
Aurelia | Compose nested issue
<template>
<compose view-model.bind='level1ViewModel'></compose>
</template>
@bigopon
bigopon / app.html
Last active December 10, 2016 09:25 — forked from jdanyow/app.html
Aurelia Gist nested compose bubble
<template>
<h1>${message}</h1>
<compose view-model.bind='level1ViewModel'></compose>
</template>
@bigopon
bigopon / bench.js
Created December 17, 2016 01:35 — forked from jdanyow/bench.js
isObject bench
'use strict';
function log(message) {
document.getElementById('status').textContent += message + '\n';
}
log('running...');
const tests = [
null, undefined, 0, 1, true, false, '', 'adsfasf', new String('test'), {}, Object.create(null), Object.prototype, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {},
null, undefined, 0, 1, true, false, '', 'adsfasf', new String('test'), {}, Object.create(null), Object.prototype, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {},
@bigopon
bigopon / app.html
Last active December 22, 2016 12:40 — forked from MeirionHughes/app.html
scroll after push
<template>
<button click.trigger="items.push({ text: 'I am a new message no.' + items.length }) && scroll()">Add</button>
<div style='height: 400px; overflow: auto' ref='wrapper'>
<div repeat.for="item of items" style='height: 70px; margin: 10px; border: 1px solid #585'>
${item.text}
</div>
</div>
</template>
@bigopon
bigopon / app.html
Created December 28, 2016 01:36 — forked from jdanyow/app.html
Aurelia Accessible Autocomplete with Filtering
<template>
<require from="./autocomplete"></require>
<form>
<label class="form-component">
Country:<br/>
<autocomplete service.bind="suggestionService.country"
value.bind="model.country"
placeholder="Enter country..."
change.delegate="model.city = null">
</autocomplete>
@bigopon
bigopon / app.html
Created December 28, 2016 01:36 — forked from petmat/app.html
Aurelia checkbox inside button
<template>
<require from='./self'></require>
<h1>${heading}</h1>
<button type="button" click.delegate="toggleIsChecked() & self">
<input type="checkbox" checked.bind="isChecked"> ${isChecked}
</button>
</template>
@bigopon
bigopon / app.html
Created January 5, 2017 12:44 — forked from jdanyow/app.html
Aurelia capture binding command
<template>
<style>
.active {
border-color: blue;
}
</style>
<form blur.capture="currentFieldSet = null"
focus.capture="currentFieldSet = $event.target.closest('fieldset')">
<h1>Order Pizza:</h1>
@bigopon
bigopon / app.html
Last active October 18, 2017 05:06 — forked from atsu85/app.html
Aurelia OnKeyBindingBehavior updated
<template>
<require from="./on-key"></require>
<div>
Press [<b>Ctrl + Enter</b>] in textbox <br/>
Or [<b>Alt + Click</b>] it to trigger event
</div>
<input
value.bind="message"
keyup.delegate="textEntered() & keys:'ctrl':13"
mousedown.delegate="textClicked() & keys:'alt'"
@bigopon
bigopon / app.html
Last active August 28, 2017 07:35 — forked from jdanyow/app.html
Aurelia "let" element
<template>
<require from="let"></require>
<let foo="bar + message"></let>
<input value.bind='bar' />
<input value.bind='foo' />
${message}
</template>
@bigopon
bigopon / app.html
Last active October 14, 2017 14:07 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from="./debounce2"></require>
<require from='./throttle2'></require>
<style>
label {
display: block;
margin: 16px 0;
}
input {
display: block;