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
Last active November 4, 2017 00:25
Aurelia - Vanilla WC
<template>
<style>greeting-test { display: block; padding: 5px; background: deepskyblue; margin-bottom: 5px; }</style>
<greeting-test message='Hello World'></greeting-test>
<greeting-test message.bind='message'></greeting-test>
<input value.bind='message' />
<hr/>
Message 2 two-way binding
<greeting-test message.two-way='message2'></greeting-test>
<template>
<style>
.input-wrap { display: block; padding: 5px; background: #dedede; border: 1px solid #eee; }
.input-wrap + .input-wrap { margin-top: 10px; }
b { font-weight: bold; }
[m-t-5] { margin-top: 5px; }
</style>
<div class='input-wrap'>
<b>bindable (Cursor reset)</b>
@bigopon
bigopon / app.html
Last active August 5, 2017 04:04
extend html only element
<template>
<require from='./dynamic-input.htm'></require>
<style>
.input-wrap { display: block; padding: 5px; background: #dedede; border: 1px solid #eee; }
.input-wrap + .input-wrap { margin-top: 10px; }
.input-wrap > * { padding-top: 5px; }
fieldset { margin: 5px; padding: 5px; border: 1px solid #999; }
dynamic-input { display: block; }
</style>
@bigopon
bigopon / app.html
Last active August 7, 2017 14:39
View Compiler let
<template>
<require from='./dynamic-input.htm'></require>
<style>
.input-wrap { display: block; padding: 5px; background: #dedede; border: 1px solid #eee; }
.input-wrap + .input-wrap { margin-top: 10px; }
.input-wrap > * { padding-top: 5px; }
fieldset { margin: 5px; padding: 5px; border: 1px solid #999; }
dynamic-input { display: block; }
</style>
<template>
<require from='./my-input.html'></require>
<style>
.input-wrap { display: block; padding: 5px; background: #dedede; border: 1px solid #eee; }
.input-wrap + .input-wrap { margin-top: 10px; }
b { font-weight: bold; }
[m-t-5] { margin-top: 5px; }
</style>
<div class='input-wrap'>
@bigopon
bigopon / app.html
Last active August 16, 2017 04:41
Aurelia adjusted EventManger & Listener
<template>
<require from="./my-canvas"></require>
<select value.bind='drawInstruction'>
<option repeat.for='draw of draws' value.bind='draw'>${draw}</option>
</select>
<my-canvas draw-instruction.bind='drawInstruction'></my-canvas>
</template>
@bigopon
bigopon / app.html
Last active August 21, 2017 07:02
Datepicker
<template>
<require from="./datepicker"></require>
<br/>
<br/>
<date-picker date.two-way='date'></date-picker>
<hr/>
<b>Date in app view model: ${date}</b>
</template>
@bigopon
bigopon / app.html
Last active August 27, 2017 10:22
Adjust undefined binding
<template>
<a href.bind='url' ref='anchor'>Url is "${url}"</a>
<div>
</div>
<button click.delegate='url = "https://google.com"'>Home</button>
<hr/>
<template>
<require from='./my-input.html'></require>
<style>
b { font-weight: bold; }
input { display: block; width: 100%; }
</style>
<style>
.input-wrap { display: block; padding: 5px; background: #dedede; border: 1px solid #eee; }
.input-wrap + .input-wrap { margin-top: 10px; }
b { font-weight: bold; }
@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>